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

From: Jeremie Le Hen <jeremie_at_le-hen.org>
Date: Tue, 9 Aug 2005 23:52:33 +0200
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.$$

-- 
Jeremie Le Hen
< jeremie at le-hen dot org >< ttz at chchile dot org >
Received on Tue Aug 09 2005 - 19:52:21 UTC

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