Solved /etc/rc: WARNING: $amd_enable is not set properly - see rc.conf(5).

Partly because I use AMD hardware, it took me a few weeks to realise that $amd_enable is not related to AMD.

Is the truncation below – in /var/log/messages – more likely to be a bug in the base system, the port, or both?

Code:
% grep amd_enable /var/log/messages
Nov 10 06:30:09 mowa219-gjp4-8570p-freebsd root[1733]: /etc/rc: WARNING: $amd_enable is not set properly - see rc.conf(5).
Nov 13 15:49:52 mowa219-gjp4-8570p-freebsd root[1685]: /etc/rc: WARNING: $amd_enable is not set properly - see rc.conf(5).
Nov 13 16:01:44 mowa219-gjp4-8570p-freebsd root[3098]: /etc/rc.shutdown: WARNING: $amd_enable is not set properly - see rc.conf(5).
Nov 13 16:04:15 mowa219-gjp4-8570p-freebsd root[1673]: /etc/rc: WARNING: $amd_enable is not set properly - see rc.conf(5).
Nov 13 17:55:11 mowa219-gjp4-8570p-freebsd grahamperrin[68041]: /usr/sbin/service: WARNING: $amd_enable is not set properly - see rc.conf(5).
Nov 13 17:55:11 mowa219-gjp4-8570p-freebsd grahamperrin[68344]: /usr/sbin/service: WARNING: $clamav_clamd_enable is not set properly - see rc.conf(5).
Nov 14 00:33:36 mowa219-gjp4-8570p-freebsd root[62864]: /etc/rc.shutdown: WARNING: $amd_enable is not set properly - see rc.conf(5).
Nov 14 00:35:32 mowa219-gjp4-8570p-freebsd root[1630]: /etc/rc: WARNING: $amd_enable is not set properly - see rc.conf(5).
Nov 14 00:40:56 mowa219-gjp4-8570p-freebsd root[7100]: /etc/rc.shutdown: WARNING: $amd_enable is not set properly - see rc.conf(5).
Nov 14 01:02:00 mowa219-gjp4-8570p-freebsd root[1647]: /etc/rc: WARNING: $amd_enable is not set properly - see rc.conf(5).
% pkg info -x clamav
clamav-0.104.1,1
% pkg query %M security/clamav
On remove:
If you want remove clamav permanently from you system
execute following commands:

 # rm -rf /var/log/clamav
 # rm -rf /var/run/clamav
 # rm -rf /var/db/clamav
 # pw userdel clamav

% grep clam /etc/rc.conf
% grep amd_enable /usr/ports/security/clamav/files/pkg-message.in
% grep amd_enable /usr/ports/security/clamav/files/clamav-clamd.in
# clamav_clamd_enable="YES"
rcvar=clamav_clamd_enable
: ${clamav_clamd_enable:=NO}
% uname -aKU
FreeBSD mowa219-gjp4-8570p-freebsd 14.0-CURRENT FreeBSD 14.0-CURRENT #115 main-n250650-ef396441ceb: Sat Nov 13 23:52:09 GMT 2021     root@mowa219-gjp4-8570p-freebsd:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG  amd64 1400041 1400041
%

syslogd(8)
 
It seems like a typo in rc.conf that causes it to not parse a few variables correctly.
amd(8) is removed from the base system for 13-RELEASE, autofs(5) takes its place.
So if you have any amd_* variables set you can remove them given you run current.
 
is amd_enable set to something other then yes/no ?

It's not set:

Code:
% grep -i amd /etc/rc.conf
webcamd_enable="YES"
webcamd_flags="-H"
%

– and I do not want to set it.

autofs(5) takes its place.

KDE Plasma automatic mounting seems to work without autofs. I'm advised that it uses sysutils/bsdisks.

When (today) I noticed, for the first time, a warning for $clamav_clamd_enable, I imagined that the warnings about $amd_enable were somehow the same warning cut short (truncated).
 
… if you have any amd_* variables set you can remove them given you run current.

Thanks for the direction to D22466.

I suspect that the problem here was the presence of sysutils/am-utils, which I probably installed long ago (maybe years) whilst clutching at straws with auto-mount problems.

<https://www.freshports.org/devel/kf5-solid/#requiredrun> sysutils/bsdisks is a runtime dependency of devel/kf5-solid.

Code:
% pkg lock -l
Currently locked packages:
bsdisks-0.26
recoll-1.31.2
%

– the lock of bsdisks is to safeguard a patched installation. This bug is effectively fixed:
Given the stability of bsdisks, this morning I deleted am-utils:

Code:
% sysrc -f /etc/rc.conf amd_enable
sysrc: unknown variable 'amd_enable'
% man 8 amd
% man -P more 8 amd | grep automatically
       amd - automatically mount file systems
       Amd is a daemon that automatically mounts filesystems whenever a file
       automatically unmounted when they appear to have become quiescent.
% pkg provides man8/amd.8.gz
Name    : ja-man-doc-5.4.20050911_3
Desc    : Japanese translation of FreeBSD manual pages
Repo    : FreeBSD
Filename: usr/local/man/ja/man8/amd.8.gz
Name    : am-utils-6.2_9,1
Desc    : Berkeley Automounter Suite of Utilities
Repo    : FreeBSD
Filename: usr/local/man/man8/amd.8.gz
% pkg info -x am-utils
am-utils-6.2_9,1
% su -
Password:
root@mowa219-gjp4-8570p-freebsd:~ # pkg delete am-utils
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):
Installed packages to be REMOVED:
        am-utils: 6.2_9,1
Number of packages to be removed: 1
The operation will free 1 MiB.
Proceed with deinstalling packages? [y/N]: y
[1/1] Deinstalling am-utils-6.2_9,1...
[1/1] Deleting files for am-utils-6.2_9,1: 100%
/etc/rc.d/ldconfig: DEBUG: run_rc_command: doit: :
/etc/rc.d/ldconfig: DEBUG: run_rc_command: doit: ldconfig_start
/etc/rc.d/ldconfig: DEBUG: checkyesno: ldconfig_insecure is set to NO.
root@mowa219-gjp4-8570p-freebsd:~ # man amd
No manual entry for amd
root@mowa219-gjp4-8570p-freebsd:~ # exit
logout
%

It's too soon for me to be certain that deletion will end the $amd_enable warnings (for the next few hours, I'm building an update to the system), if I find the warnings gone I'll mark this topic Solved.




In the meantime I might report a bug for the Japanese manual page.
 
Thanks, now I'm almost certain that am-utils was the problem:

Code:
% file /etc/rc.d/amd
/etc/rc.d/amd: cannot open `/etc/rc.d/amd' (No such file or directory)
% sudo pkg install --quiet --yes am-utils
grahamperrin's password:
/etc/rc.d/ldconfig: DEBUG: run_rc_command: doit: :
/etc/rc.d/ldconfig: DEBUG: run_rc_command: doit: ldconfig_start
/etc/rc.d/ldconfig: DEBUG: checkyesno: ldconfig_insecure is set to NO.
% file /etc/rc.d/amd
/etc/rc.d/amd: cannot open `/etc/rc.d/amd' (No such file or directory)
% pkg info --list am-utils
am-utils-6.2_9,1:
        /usr/local/bin/pawd
        /usr/local/etc/amd.conf-sample
        /usr/local/etc/lostaltmail.conf-sample
        /usr/local/etc/rc.d/amd
        /usr/local/lib/libamu.a
        /usr/local/lib/libamu.so
        /usr/local/lib/libamu.so.4
        /usr/local/lib/libamu.so.4.0.0
        /usr/local/man/man1/pawd.1.gz
        /usr/local/man/man5/amd.conf.5.gz
        /usr/local/man/man8/amd.8.gz
        /usr/local/man/man8/amq.8.gz
        /usr/local/man/man8/automount2amd.8.gz
        /usr/local/man/man8/fixmount.8.gz
        /usr/local/man/man8/fsinfo.8.gz
        /usr/local/man/man8/hlfsd.8.gz
        /usr/local/man/man8/mk-amd-map.8.gz
        /usr/local/man/man8/sun2amd.8.gz
        /usr/local/man/man8/wire-test.8.gz
        /usr/local/sbin/am-eject
        /usr/local/sbin/amd
        /usr/local/sbin/amd2ldif
        /usr/local/sbin/amd2sun
        /usr/local/sbin/amq
        /usr/local/sbin/automount2amd
        /usr/local/sbin/ctl-amd
        /usr/local/sbin/ctl-hlfsd
        /usr/local/sbin/fix-amd-map
        /usr/local/sbin/fixmount
        /usr/local/sbin/fixrmtab
        /usr/local/sbin/fsinfo
        /usr/local/sbin/hlfsd
        /usr/local/sbin/lostaltmail
        /usr/local/sbin/mk-amd-map
        /usr/local/sbin/sun2amd
        /usr/local/sbin/wait4amd
        /usr/local/sbin/wait4amd2die
        /usr/local/sbin/wire-test
        /usr/local/share/doc/am-utils/AUTHORS
        /usr/local/share/doc/am-utils/BUGS
        /usr/local/share/doc/am-utils/FAQ
        /usr/local/share/doc/am-utils/NEWS
        /usr/local/share/doc/am-utils/README.attrcache
        /usr/local/share/doc/am-utils/README.ldap
        /usr/local/share/doc/am-utils/ldap-id.txt
        /usr/local/share/doc/am-utils/ldap.schema
        /usr/local/share/info/am-utils.info
        /usr/local/share/licenses/am-utils-6.2_9,1/BSD3CLAUSE
        /usr/local/share/licenses/am-utils-6.2_9,1/LICENSE
        /usr/local/share/licenses/am-utils-6.2_9,1/catalog.mk
% file /usr/local/etc/rc.d/amd
/usr/local/etc/rc.d/amd: POSIX shell script, ASCII text executable
% sudo pkg delete --quiet -y am-utils
/etc/rc.d/ldconfig: DEBUG: run_rc_command: doit: :
/etc/rc.d/ldconfig: DEBUG: run_rc_command: doit: ldconfig_start
/etc/rc.d/ldconfig: DEBUG: checkyesno: ldconfig_insecure is set to NO.
% file /usr/local/etc/rc.d/amd
/usr/local/etc/rc.d/amd: cannot open `/usr/local/etc/rc.d/amd' (No such file or directory)
%
 
Back
Top