tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: /etc/daily, rc.conf, swap, NTP, NFS



On Wed, Jul 10, 2013 at 1:05 AM, Erik Fair <fair%netbsd.org@localhost> wrote:
>
> On Jun 29, 2013, at 10:51, matthew sporleder <msporleder%gmail.com@localhost> 
> wrote:
>
>> You don't need to source rc.conf directly since /etc/daily sources rc.subr
>>
>> Then you can use checkyesno or load_rc_config or load_rc_config_var
>> depending on what needs checking.
>
> Actually, yes, I do - see /etc/rc
>
>         Erik <fair%netbsd.org@localhost>
>


I must be missing it, then.
Without load_rc_config I don't see how we check for things in rc.conf.d

cat /etc/rc.conf.d/redis
redis=YES

---
#!/bin/sh
. /etc/rc.subr
. /etc/rc.conf
checkyesno redis && echo ${redis}

./foo.sh: WARNING: $redis is not set properly - see rc.conf(5).

---
#!/bin/sh
. /etc/rc.subr
load_rc_config redis
checkyesno redis && echo ${redis}

YES


Home | Main Index | Thread Index | Old Index