From owner-freebsd-current@FreeBSD.ORG Tue Aug 9 22:00:17 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1974316A41F for ; Tue, 9 Aug 2005 22:00:17 +0000 (GMT) (envelope-from stb@lassitu.de) Received: from schlepper.zs64.net (schlepper.zs64.net [212.12.50.230]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8305B43D58 for ; Tue, 9 Aug 2005 22:00:15 +0000 (GMT) (envelope-from stb@lassitu.de) Received: from [IPv6:::1] (schlepper [212.12.50.230]) by schlepper.zs64.net (8.13.1/8.12.9) with ESMTP id j79M0C3e074544; Wed, 10 Aug 2005 00:00:13 +0200 (CEST) (envelope-from stb@lassitu.de) In-Reply-To: <20050809215233.GB45385@obiwan.tataz.chchile.org> References: <96153776-0BE4-456F-B573-042E84730DFE@lassitu.de> <20050809215233.GB45385@obiwan.tataz.chchile.org> Mime-Version: 1.0 (Apple Message framework v733) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <10B8284B-6366-40A7-B426-C646D9653FFA@lassitu.de> Content-Transfer-Encoding: 7bit From: Stefan Bethke Date: Wed, 10 Aug 2005 00:00:09 +0200 To: Jeremie Le Hen X-Mailer: Apple Mail (2.733) Cc: drvince@anonymnet.net, freebsd-current@freebsd.org Subject: Re: More into /etc/rc.d/jail X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Aug 2005 22:00:17 -0000 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 Fon +49 170 346 0140