From owner-freebsd-current@FreeBSD.ORG Fri Mar 5 23:26:46 2004 Return-Path: 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 CF09516A4CE for ; Fri, 5 Mar 2004 23:26:46 -0800 (PST) Received: from cs.huji.ac.il (cs.huji.ac.il [132.65.16.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8D39E43D31 for ; Fri, 5 Mar 2004 23:26:46 -0800 (PST) (envelope-from danny@cs.huji.ac.il) Received: from pampa.cs.huji.ac.il ([132.65.80.32] ident=danny) by cs.huji.ac.il with esmtp id 1AzWCn-000Jz2-LQ; Sat, 06 Mar 2004 09:26:41 +0200 X-Mailer: exmh version 2.6.3 04/04/2003 with nmh-1.0.4 To: Brooks Davis In-reply-to: Your message of Fri, 5 Mar 2004 16:57:26 -0800 . Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 06 Mar 2004 09:26:41 +0200 From: Danny Braniss Message-Id: cc: current@freebsd.org Subject: Re: initdiskless/rc.diskless1 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Sat, 06 Mar 2004 07:26:46 -0000 hi, I've been using this for some time, in rc.d/initdiskless: eval `kenv -s -c rc.` rm -f /etc/rc.conf /etc/rc.conf.local for fc in $conf0 $conf1 $conf2 $conf3 $conf4 $conf5 $conf6 $conf7 $conf8 $conf9 rc.conf.$hostname confpath=`kenv conf-path` if [ "$confpath" ] ; then if [ "`expr $confpath : '\(.*\):'`" ] ; then echo Mounting $confpath on /conf mount_nfs $confpath /conf chkerr $? "mount_nfs $confpath /conf" fi fi do ho=`expr $fc : '\(.*\):'` fl=`expr $fc : '.*/\(.*\)'` if [ "${ho}" != "" ]; then mp=`expr $fc : '\(.*\)/.*'` mount_nfs $mp /mnt > /dev/null 2>&1 if [ -f /mnt/$fl ]; then echo "# from $fc /mnt/$fl" >> /etc/rc.conf cat /mnt/$fl >> /etc/rc.conf fi umount /mnt > /dev/null 2>&1 elif [ -e /conf/$fc ] ; then echo "# from /conf/$fc" >> /etc/rc.conf cat /conf/$fc >> /etc/rc.conf fi done