From owner-freebsd-current Thu Feb 21 20: 0:55 2002 Delivered-To: freebsd-current@freebsd.org Received: from dragon.nuxi.com (trang.nuxi.com [66.92.13.169]) by hub.freebsd.org (Postfix) with ESMTP id A777937B404 for ; Thu, 21 Feb 2002 20:00:51 -0800 (PST) Received: (from obrien@localhost) by dragon.nuxi.com (8.11.6/8.11.1) id g1M40pn78295 for current@freebsd.org; Thu, 21 Feb 2002 20:00:51 -0800 (PST) (envelope-from obrien) Date: Thu, 21 Feb 2002 20:00:51 -0800 From: "David O'Brien" To: current@freebsd.org Subject: changes to rc.diskless* Message-ID: <20020221200050.A78243@dragon.nuxi.com> Reply-To: obrien@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i X-Operating-System: FreeBSD 5.0-CURRENT Organization: The NUXI BSD group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG The existing very bazaar and local policy in rc.diskless1 is Just Wrong; and looks like no other Unix diskless configuration I've ever seen. I plan on committing this patch to negate this. The use of an MFS /var should also be settable. Otherwise installing ports(packages) is just a total PITA. Index: rc.diskless1 =================================================================== RCS file: /home/ncvs/src/etc/rc.diskless1,v retrieving revision 1.13 diff -u -r1.13 rc.diskless1 --- rc.diskless1 17 Jan 2002 00:10:28 -0000 1.13 +++ rc.diskless1 22 Feb 2002 03:52:41 -0000 @@ -92,13 +92,14 @@ done echo "Interface ${bootp_ifc} IP-Address ${bootp_ipa} Broadcast ${bootp_ipbca}" +if [ -d /conf/default/etc ]; then + mount_md 4096 /etc 0 + chkerr $? "MFS mount on /etc" + /bin/chmod 755 /etc -mount_md 4096 /etc 0 -chkerr $? "MFS mount on /etc" -/bin/chmod 755 /etc - -/bin/cp -Rp /conf/default/etc/* /etc -chkerr $? "cp /conf/default/etc to /etc MFS" + /bin/cp -Rp /conf/default/etc/* /etc + chkerr $? "cp /conf/default/etc to /etc MFS" +fi # Allow for override files to replace files in /etc. Use /conf/*/etc to find # the override files. First choice is default files that # always override, @@ -113,6 +114,11 @@ cp -Rp /conf/${i}/etc/* /etc fi done + +# Since we are starting with a very fresh /etc on an MFS: +if [ -d /conf/default/etc ]; then + newaliases +if # Tell /etc/rc to run the specified script after it does its mounts but # before it does anything else. Index: rc.diskless2 =================================================================== RCS file: /home/ncvs/src/etc/rc.diskless2,v retrieving revision 1.15 diff -u -r1.15 rc.diskless2 --- rc.diskless2 26 Dec 2001 17:18:39 -0000 1.15 +++ rc.diskless2 22 Feb 2002 03:56:18 -0000 @@ -56,7 +56,7 @@ fi echo "+++ mount_md of /var" -mount_md ${varsize:=65536} /var 1 +mount_md ${varsize:=32m} /var 1 echo "+++ populate /var using /etc/mtree/BSD.var.dist" /usr/sbin/mtree -deU -f /etc/mtree/BSD.var.dist -p /var @@ -83,7 +83,7 @@ # so if /var/tmp == /tmp, then you don't get a vi.recover. # if [ ! -h /tmp ]; then - mount_md ${tmpsize:=20480} /tmp 2 + mount_md ${tmpsize:=64m} /tmp 2 chmod 01777 /tmp fi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message