From jeremyp@gsmx07.alcatel.com.au  Mon Jan  3 20:07:18 2000
Return-Path: <jeremyp@gsmx07.alcatel.com.au>
Received: from alcanet.com.au (border.alcanet.com.au [203.62.196.10])
	by hub.freebsd.org (Postfix) with ESMTP id F3E6915382
	for <FreeBSD-gnats-submit@FreeBSD.ORG>; Mon,  3 Jan 2000 20:07:07 -0800 (PST)
	(envelope-from jeremyp@gsmx07.alcatel.com.au)
Received: by border.alcanet.com.au id <40322>; Tue, 4 Jan 2000 14:59:57 +1100
Message-Id: <00Jan4.145957est.40322@border.alcanet.com.au>
Date: Tue, 4 Jan 2000 14:59:56 +1100
From: Peter Jeremy <jeremyp@gsmx07.alcatel.com.au>
Reply-To: peter.jeremy@alcatel.com.au
To: freefall-gnats@gsmx07.alcatel.com.au
Subject: PicoBSD can only update files from within /etc
X-Send-Pr-Version: 3.2

>Number:         15874
>Category:       misc
>Synopsis:       PicoBSD can only update files from within /etc
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-small
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan  3 20:10:01 PST 2000
>Closed-Date:    Fri Mar 8 05:01:39 PST 2002
>Last-Modified:  Fri Mar 08 05:02:45 PST 2002
>Originator:     Peter Jeremy
>Release:        FreeBSD 4.0-CURRENT i386
>Organization:
>Environment:

	Found in -stable, but -current should exhibit the same behaviour.

>Description:

	During PicoBSD boot, files in the /etc directory (and sub-
	directories) of the boot floppy are copied into the MFS.

	In order to allow port and user configuration files
	(specifically ssh configuration files and keys for my
	purposes), it would be useful to also copy files from /root
	and /usr as well.

	Also, the size of the startup script (mfs.rc) should not be
	an issue if it is deleted before the replacement is copied
	over it (although I haven't confirmed this).

>How-To-Repeat:

	Add files other than in /etc on the floppy disk - they are
	not copied.

>Fix:

	The following is the change I made to my customised
	/usr/src/release/picobsd/net/floppy.tree/etc/mfs.rc

diff -ur net/floppy.tree/etc/mfs.rc custom/floppy.tree/etc/mfs.rc
--- net/floppy.tree/etc/mfs.rc	Mon Aug 30 01:53:11 1999
+++ custom/floppy.tree/etc/mfs.rc	Thu Sep 16 16:14:51 1999
@@ -23,8 +23,10 @@
 echo ""
 echo "Reading /etc from startup floppy..."
 mount -o rdonly /dev/fd0a /start_floppy
-cd /start_floppy/etc
-cp -Rp . /etc/
+rm /etc/rc
+for i in etc root usr ; do
+    cd /start_floppy/$i 2>/dev/null && cp -Rp . /$i/
+done
 cd /etc
 pwd_mkdb -p ./master.passwd
 umount /start_floppy

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-small 
Responsible-Changed-By: johan 
Responsible-Changed-When: Thu Aug 24 04:29:52 PDT 2000 
Responsible-Changed-Why:  
Over to maintainer group. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=15874 
State-Changed-From-To: open->closed 
State-Changed-By: luigi 
State-Changed-When: Fri Mar 8 05:01:39 PST 2002 
State-Changed-Why:  
The rc scripts have been restructured to handle part of 
the things suggested here. 


http://www.FreeBSD.org/cgi/query-pr.cgi?pr=15874 
>Unformatted:
