From nobody@FreeBSD.org  Wed Oct 10 08:49:25 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id 76F6937B405
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 10 Oct 2001 08:49:25 -0700 (PDT)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.4/8.11.4) id f9AFnPn94413;
	Wed, 10 Oct 2001 08:49:25 -0700 (PDT)
	(envelope-from nobody)
Message-Id: <200110101549.f9AFnPn94413@freefall.freebsd.org>
Date: Wed, 10 Oct 2001 08:49:25 -0700 (PDT)
From: Jean-Francois Dockes <jean-francois.dockes@wanadoo.fr>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Modification of rc.diskless1 needs change in examples/diskless/clone_root
X-Send-Pr-Version: www-1.0

>Number:         31200
>Category:       conf
>Synopsis:       Modification of rc.diskless1 needs change in examples/diskless/clone_root
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bsd
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Oct 10 08:50:01 PDT 2001
>Closed-Date:    Sat Aug 24 02:16:58 PDT 2002
>Last-Modified:  Sat Aug 24 02:16:58 PDT 2002
>Originator:     Jean-Francois Dockes
>Release:        4.4-STABLE
>Organization:
>Environment:
FreeBSD hautmedoc 4.4-STABLE FreeBSD 4.4-STABLE #2: Mon Oct  8 18:44:52 CEST 2001     dockes@hautmedoc:/usr/src/sys/compile/HAUTMEDOC  i386

>Description:
Revision 1.10 of rc.diskless1 introduced a change where the script now expects a fully populated /conf/default/etc (instead of only override files).

/usr/share/examples/diskless/clone_root was not updated to reflect this change, so that the final /etc after startup is missing most files.
>How-To-Repeat:
Create a root hierarchy with clone_root and try to boot a diskless workstation using it.


>Fix:
When cloning the root, clone_root should copy the server's /etc directory before copying files from /conf/default/etc. The end result will be the same as what existed before the change in rc.diskless1.
The patch follows. tabs are mangled, but I guess that the four added lines are easy enough to copy by hand...

*** clone_root.orig     Wed Oct 10 16:52:15 2001
--- clone_root  Wed Oct 10 17:03:58 2001
***************
*** 99,104 ****
--- 99,108 ----
  update_conf_and_pw() {
    echo "+++ Copying files in /conf and password files"
    (cd ${DEST} ; rm -rf conf )
+   # rc.diskless1 expects a fully populated etc in conf/default/etc
+   mkdir -p ${DEST}/conf/default/etc || exit 1
+   (cd /etc ; tar clf - .) | (cd ${DEST}/conf/default/etc ; tar xf -)
+   # Add diskless-specific files from /conf on the server
    (cd / ; tar clf - conf ) | (cd ${DEST}; tar xvf - )
    mkdir -p ${DEST}/conf/etc       # used to mount things
    (cd /etc ; tar cvf - ${PWFILES} ) | (cd ${DEST}/etc ; tar xf - )





>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->bsd 
Responsible-Changed-By: johan 
Responsible-Changed-When: Wed Aug 21 14:07:35 PDT 2002 
Responsible-Changed-Why:  
Over to Brian who made the change to rc.diskless1 

http://www.freebsd.org/cgi/query-pr.cgi?pr=31200 
State-Changed-From-To: open->closed 
State-Changed-By: schweikh 
State-Changed-When: Sat Aug 24 02:15:55 PDT 2002 
State-Changed-Why:  
Originator reports that this was fixed by revision 1.2.2.2 of 
/usr/share/examples/diskless/clone_root and revision 1.5.2.7 of 
/etc/rc.diskless1. (added /conf/base/etc to be copied before 
/conf/default/etc). Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=31200 
>Unformatted:
