Re: More into /etc/rc.d/jail

From: Stefan Bethke <stb_at_lassitu.de>
Date: Wed, 10 Aug 2005 00:00:09 +0200
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
Received on Tue Aug 09 2005 - 20:00:17 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:41 UTC