https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293360
Bug ID: 293360
Summary: sysrc(8) inconsistencies regarding /etc/rc.conf.d/name
and associated flags
Product: Base System
Version: 14.3-STABLE
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: bin
Assignee: [email protected]
Reporter: [email protected]
On a bare system, sysrc(8) and rc(8) disagree on flag values if those are set
in /etc/rc.conf.d/name .
Example:
# mkdir -p /etc/rc.conf.d
# echo 'syslogd_flags="-ss -c"' > /etc/rc.conf.d/syslogd
# reboot
# sysrc -L|grep -Eo '[^ ]+syslogd'
/etc/rc.conf.d/syslogd
/usr/local/etc/rc.conf.d/syslogd
# pgrep -f -l syslogd
67148 /usr/sbin/syslogd -ss -c
# sysrc syslogd_flags
syslogd_flags: -s
Upon startup, syslogd(8) is correctly started with the flags I setup (-ss -c)
but that info isn't shown in sysrc(8), even though `sysrc -L` tells me it will
look into `/etc/rc.conf.d/syslogd`.
This is also the case for other services I tried. With cron(8), `cron_flags="-m
''"` in /etc/rc.conf.d/cron and syncthing `syncthing_enable="YES"` in
/etc/rc.conf.d/syncthing:
# sysrc syncthing_enable
sysrc: unknown variable 'syncthing_enable'
# grep syncthing /var/log/messages
Feb 22 10:06:09 st root[49703]: /etc/rc: DEBUG: Sourcing
/etc/rc.conf.d/syncthing
Feb 22 10:06:09 st root[53372]: /etc/rc: DEBUG: checkyesno:
syncthing_enable is set to YES.
Feb 22 10:06:09 st root[55817]: /etc/rc: DEBUG: run_rc_command:
start_precmd: syncthing_startprecmd
Feb 22 10:06:09 st root[63897]: /etc/rc: DEBUG: run_rc_command: doit:
limits -C daemon su -m syncthing -c 'sh -c " /usr/sbin/daemon -cf -p
/var/run/syncthing.pid /usr/local/bin/syncthing --home=/usr/local/etc/syncthing
--logfile=/var/log/syncthing.log --no-browser "'
# sysrc cron_flags
cron_flags:
# pgrep -f -l cron
3684 /usr/sbin/cron -m -s
--
You are receiving this mail because:
You are the assignee for the bug.