Question about port startup, /usr/local/etc/rc.conf.d

Adam Weinberger adamw at adamw.org
Wed Nov 6 11:40:09 UTC 2019


On Wed, Nov 6, 2019 at 1:45 AM Patrick M. Hausen <hausen at punkt.de> wrote:
>
> Hi, all,
>
> with new installations I started to keep an empty /etc/rc.conf and put
> all settings into /etc/rc.conf.d and /usr/local/etc/rc.conf.d.
>
> Example:
>
> root at gimli:~ # ll /etc/rc.conf.d
> total 4
> -rw-r--r--  1 root  wheel  13 Nov  2 15:07 dumpon
> -rw-r--r--  1 root  wheel  17 Nov  2 15:06 hostname
> -rw-r--r--  1 root  wheel  38 Nov  2 22:12 moused
> -rw-r--r--  1 root  wheel  66 Nov  2 22:28 network
> -rw-r--r--  1 root  wheel  43 Nov  2 15:10 ntpd
> -rw-r--r--  1 root  wheel  18 Nov  2 15:06 sshd
> -rw-r--r--  1 root  wheel  12 Nov  2 15:06 syscons
> -rw-r--r--  1 root  wheel  17 Nov  2 15:07 zfs
>
> root at gimli:~ # ll /usr/local/etc/rc.conf.d
> total 2
> -rw-r--r--  1 root  wheel  26 Nov  2 15:42 avahi_daemon
> -rw-r--r--  1 root  wheel  18 Nov  2 15:43 dbus
> -rw-r--r--  1 root  wheel  18 Nov  6 08:58 hald
>
> The dbus and hald files contain only the "enable" setting for the respective
> service:
>
> root at gimli:/usr/local/etc/rc.conf.d # cat dbus hald
> dbus_enable="YES"
> hald_enable="YES"
>
> The problem I encountered is this:
>
> root at gimli:~ # service dbus restart
> Stopping dbus.
> Waiting for PIDS: 33301.
> Starting dbus.
> root at gimli:~ # service hald restart
> Stopping hald.
> Waiting for PIDS: 33369.
> /usr/local/etc/rc.d/hald: WARNING: $dbus_enable is not set properly - see rc.conf(5).
> Starting hald.
>
> As you can see dbus is properly enabled and starting. Is the warning
> a bug in the rc.d/hald script I should file a bug report for?

Hi Patrick,

It's a limitation of rc(8) itself. The problem is that rc(8) only
gives rc.d/hald access to etc/rc.conf.d/hald. It doesn't load
etc/rc.conf.d/dbus at all. You'll need to duplicate the dbus info into
rc.conf.d/hald.

# Adam


-- 
Adam Weinberger
adamw at adamw.org
https://www.adamw.org


More information about the freebsd-ports mailing list