Date: Tue, 9 Aug 2005 23:52:33 +0200 From: Jeremie Le Hen <jeremie@le-hen.org> To: Stefan Bethke <stb@lassitu.de> Cc: drvince@anonymnet.net, freebsd-current@freebsd.org Subject: Re: More into /etc/rc.d/jail Message-ID: <20050809215233.GB45385@obiwan.tataz.chchile.org> In-Reply-To: <96153776-0BE4-456F-B573-042E84730DFE@lassitu.de> References: <N1-uLBXxM-zn8@Safe-mail.net> <96153776-0BE4-456F-B573-042E84730DFE@lassitu.de>
next in thread | previous in thread | raw e-mail | index | archive | help
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 >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050809215233.GB45385>
