More into /etc/rc.d/jail

Stefan Bethke stb at lassitu.de
Tue Aug 9 22:00:17 GMT 2005


Am 09.08.2005 um 23:52 schrieb Jeremie Le Hen:

> Hi Stefan,
>
>
>> #!/bin/sh
>> #
>> # $Id$
>> #
>>
>> # PROVIDE: mdconfig
>> # REQUIRE: mountcritlocal
>> # BEFORE: jail
>> # KEYWORD: nojail shutdown
>>
>> . /etc/rc.subr
>>
>> name="mdconfig"
>> start_cmd="mdconfig_start"
>> stop_cmd="mdconfig_stop"
>>
>> mdconfig_start()
>> {
>>     if ! checkyesno mdconfig_enable; then
>>         return 0
>>     fi
>>     sed -e 's/#.*$//' <${mdconfig_conf} |grep -v '^[[:space:]]*$'  
>> >/tmp/mdconfig.$$
>>
>
> FYI, this could be written with one sed(1) command :
>
>     sed -E '/^[[:space:]]*(#.*)?$/d' < ${mdconfig_conf} > /tmp/ 
> mdconfig.$$

Thanks for the hint!

Our little script certainly isn't meant as a prime example; I just  
thought that it might be helpful as a starting point...


Stefan

-- 
Stefan Bethke <stb at lassitu.de>   Fon +49 170 346 0140



More information about the freebsd-current mailing list