head	1.5;
access;
symbols
	RELENG_8_4:1.5.0.2
	RELENG_9_1_0_RELEASE:1.4.16.1.4.2
	RELENG_9_1:1.4.16.1.0.4
	RELENG_9_1_BP:1.4.16.1
	RELENG_8_3_0_RELEASE:1.4.10.1.8.1
	RELENG_8_3:1.4.10.1.0.8
	RELENG_8_3_BP:1.4.10.1
	RELENG_9_0_0_RELEASE:1.4.16.1.2.1
	RELENG_9_0:1.4.16.1.0.2
	RELENG_9_0_BP:1.4.16.1
	RELENG_9:1.4.0.16
	RELENG_9_BP:1.4
	RELENG_7_4_0_RELEASE:1.4.14.1
	RELENG_8_2_0_RELEASE:1.4.10.1.6.1
	RELENG_7_4:1.4.0.14
	RELENG_7_4_BP:1.4
	RELENG_8_2:1.4.10.1.0.6
	RELENG_8_2_BP:1.4.10.1
	RELENG_8_1_0_RELEASE:1.4.10.1.4.1
	RELENG_8_1:1.4.10.1.0.4
	RELENG_8_1_BP:1.4.10.1
	RELENG_7_3_0_RELEASE:1.4.12.1
	RELENG_7_3:1.4.0.12
	RELENG_7_3_BP:1.4
	RELENG_8_0_0_RELEASE:1.4.10.1.2.1
	RELENG_8_0:1.4.10.1.0.2
	RELENG_8_0_BP:1.4.10.1
	RELENG_8:1.4.0.10
	RELENG_8_BP:1.4
	RELENG_7_2_0_RELEASE:1.4.8.1
	RELENG_7_2:1.4.0.8
	RELENG_7_2_BP:1.4
	RELENG_7_1_0_RELEASE:1.4.6.1
	RELENG_6_4_0_RELEASE:1.3.12.1
	RELENG_7_1:1.4.0.6
	RELENG_7_1_BP:1.4
	RELENG_6_4:1.3.0.12
	RELENG_6_4_BP:1.3
	RELENG_7_0_0_RELEASE:1.4
	RELENG_6_3_0_RELEASE:1.3
	RELENG_7_0:1.4.0.4
	RELENG_7_0_BP:1.4
	RELENG_6_3:1.3.0.10
	RELENG_6_3_BP:1.3
	RELENG_7:1.4.0.2
	RELENG_7_BP:1.4
	RELENG_6_2_0_RELEASE:1.3
	RELENG_6_2:1.3.0.8
	RELENG_6_2_BP:1.3
	RELENG_5_5_0_RELEASE:1.1
	RELENG_5_5:1.1.0.16
	RELENG_5_5_BP:1.1
	RELENG_6_1_0_RELEASE:1.3
	RELENG_6_1:1.3.0.6
	RELENG_6_1_BP:1.3
	RELENG_6_0_0_RELEASE:1.3
	RELENG_6_0:1.3.0.4
	RELENG_6_0_BP:1.3
	RELENG_6:1.3.0.2
	RELENG_6_BP:1.3
	RELENG_5_4_0_RELEASE:1.1
	RELENG_5_4:1.1.0.14
	RELENG_5_4_BP:1.1
	RELENG_4_11_0_RELEASE:1.1.2.4
	RELENG_4_11:1.1.2.4.0.12
	RELENG_4_11_BP:1.1.2.4
	RELENG_5_3_0_RELEASE:1.1
	RELENG_5_3:1.1.0.12
	RELENG_5_3_BP:1.1
	RELENG_5:1.1.0.10
	RELENG_5_BP:1.1
	RELENG_4_10_0_RELEASE:1.1.2.4
	RELENG_4_10:1.1.2.4.0.10
	RELENG_4_10_BP:1.1.2.4
	RELENG_5_2_1_RELEASE:1.1
	RELENG_5_2_0_RELEASE:1.1
	RELENG_5_2:1.1.0.8
	RELENG_5_2_BP:1.1
	RELENG_4_9_0_RELEASE:1.1.2.4
	RELENG_4_9:1.1.2.4.0.8
	RELENG_4_9_BP:1.1.2.4
	RELENG_5_1_0_RELEASE:1.1
	RELENG_5_1:1.1.0.6
	RELENG_5_1_BP:1.1
	RELENG_4_8_0_RELEASE:1.1.2.4
	RELENG_4_8:1.1.2.4.0.6
	RELENG_4_8_BP:1.1.2.4
	RELENG_5_0_0_RELEASE:1.1
	RELENG_5_0:1.1.0.4
	RELENG_5_0_BP:1.1
	RELENG_4_7_0_RELEASE:1.1.2.4
	RELENG_4_7:1.1.2.4.0.4
	RELENG_4_7_BP:1.1.2.4
	RELENG_4_6_2_RELEASE:1.1.2.4
	RELENG_4_6_1_RELEASE:1.1.2.4
	RELENG_4_6_0_RELEASE:1.1.2.4
	RELENG_4_6:1.1.2.4.0.2
	RELENG_4_6_BP:1.1.2.4
	RELENG_4_5_0_RELEASE:1.1.2.1
	RELENG_4_5:1.1.2.1.0.6
	RELENG_4_5_BP:1.1.2.1
	RELENG_4_4_0_RELEASE:1.1.2.1
	RELENG_4_4:1.1.2.1.0.4
	RELENG_4_4_BP:1.1.2.1
	RELENG_4_3_0_RELEASE:1.1.2.1
	RELENG_4_3:1.1.2.1.0.2
	RELENG_4_3_BP:1.1.2.1
	RELENG_4:1.1.0.2;
locks; strict;
comment	@# @;


1.5
date	2012.11.17.01.50.31;	author svnexp;	state Exp;
branches
	1.5.2.1;
next	1.4;

1.4
date	2006.06.02.15.01.11;	author motoyuki;	state Exp;
branches
	1.4.2.1
	1.4.6.1
	1.4.8.1
	1.4.10.1
	1.4.12.1
	1.4.14.1
	1.4.16.1;
next	1.3;

1.3
date	2004.09.23.21.17.31;	author brooks;	state Exp;
branches
	1.3.2.1
	1.3.12.1;
next	1.2;

1.2
date	2004.09.23.15.52.42;	author brooks;	state Exp;
branches;
next	1.1;

1.1
date	2001.04.16.06.37.03;	author luigi;	state Exp;
branches
	1.1.2.1;
next	;

1.5.2.1
date	2012.11.17.01.50.31;	author svnexp;	state dead;
branches;
next	1.5.2.2;

1.5.2.2
date	2013.03.28.13.03.42;	author svnexp;	state Exp;
branches;
next	;

1.4.2.1
date	2012.11.17.08.03.52;	author svnexp;	state Exp;
branches;
next	;

1.4.6.1
date	2008.11.25.02.59.29;	author kensmith;	state Exp;
branches;
next	;

1.4.8.1
date	2009.04.15.03.14.26;	author kensmith;	state Exp;
branches;
next	;

1.4.10.1
date	2009.08.03.08.13.06;	author kensmith;	state Exp;
branches
	1.4.10.1.2.1
	1.4.10.1.4.1
	1.4.10.1.6.1
	1.4.10.1.8.1;
next	1.4.10.2;

1.4.10.2
date	2012.11.17.10.36.19;	author svnexp;	state Exp;
branches;
next	;

1.4.10.1.2.1
date	2009.10.25.01.10.29;	author kensmith;	state Exp;
branches;
next	;

1.4.10.1.4.1
date	2010.06.14.02.09.06;	author kensmith;	state Exp;
branches;
next	;

1.4.10.1.6.1
date	2010.12.21.17.09.25;	author kensmith;	state Exp;
branches;
next	;

1.4.10.1.8.1
date	2012.03.03.06.15.13;	author kensmith;	state Exp;
branches;
next	1.4.10.1.8.2;

1.4.10.1.8.2
date	2012.11.17.08.24.59;	author svnexp;	state Exp;
branches;
next	;

1.4.12.1
date	2010.02.10.00.26.20;	author kensmith;	state Exp;
branches;
next	;

1.4.14.1
date	2010.12.21.17.10.29;	author kensmith;	state Exp;
branches;
next	1.4.14.2;

1.4.14.2
date	2012.11.17.08.16.56;	author svnexp;	state Exp;
branches;
next	;

1.4.16.1
date	2011.09.23.00.51.37;	author kensmith;	state Exp;
branches
	1.4.16.1.2.1
	1.4.16.1.4.1;
next	1.4.16.2;

1.4.16.2
date	2012.11.17.11.36.35;	author svnexp;	state Exp;
branches;
next	;

1.4.16.1.2.1
date	2011.11.11.04.20.22;	author kensmith;	state Exp;
branches;
next	1.4.16.1.2.2;

1.4.16.1.2.2
date	2012.11.17.08.36.34;	author svnexp;	state Exp;
branches;
next	;

1.4.16.1.4.1
date	2012.08.05.23.54.33;	author kensmith;	state Exp;
branches;
next	1.4.16.1.4.2;

1.4.16.1.4.2
date	2012.11.17.08.47.24;	author svnexp;	state Exp;
branches;
next	;

1.3.2.1
date	2012.11.17.07.41.32;	author svnexp;	state Exp;
branches;
next	;

1.3.12.1
date	2008.10.02.02.57.24;	author kensmith;	state Exp;
branches;
next	;

1.1.2.1
date	2001.04.17.15.50.31;	author luigi;	state Exp;
branches;
next	1.1.2.2;

1.1.2.2
date	2002.02.12.17.33.40;	author luigi;	state Exp;
branches;
next	1.1.2.3;

1.1.2.3
date	2002.03.15.08.00.37;	author luigi;	state Exp;
branches;
next	1.1.2.4;

1.1.2.4
date	2002.04.07.18.16.18;	author luigi;	state Exp;
branches;
next	1.1.2.5;

1.1.2.5
date	2012.11.17.07.24.44;	author svnexp;	state Exp;
branches;
next	;


desc
@@


1.5
log
@Switching exporter and resync
@
text
@#!/bin/sh
#
# (C) 2001 Luigi Rizzo, Gabriele Cecchetti
#	<Standard BSD copyright>
# Revised 2001.04.16
#
# $FreeBSD: head/share/examples/diskless/clone_root 159175 2006-06-02 15:01:11Z motoyuki $
#
# clone root filesystem for diskless root stuff
#
# usage
#	clone_root all		to do a full copy (e.g. bin, sbin...)
#	clone_root update	to recreate /var (including devices)
#	clone_root		to copy /conf and password-related files
#
# This script assumes that you use a shared readonly root and /usr
# partition. The script creates a partial clone of the root partition,
# and puts it into ${DEST} (defaults to /diskless_root ) on the server,
# where it is read.
#
# To run a diskless install you need to do the following:
#
# create /conf/default/etc/fstab
#    this will replace the standard /etc/fstab and should contain
#    as a minimum the following lines
#    ${SERVER}:${DEST} /     nfs    ro 0 0
#    ${SERVER}:/usr    /usr  nfs    ro 0 0
#    proc              /proc procfs rw 0 0
#
# create /conf/default/etc/rc.conf
#    this will replace the standard rc.conf and should contain
#    the startup options for the diskless client. Most likely
#    you will not need to set hostname and ifconfig_* because these
#    will be already set by the startup code. You will also
#    probably need to set local_startup="" so that the server's
#    local startup files will not be used.
#
# create a kernel config file in /sys/i386/conf/DISKLESS with
#	options MD_ROOT
#	options BOOTP
#	options BOOTP_NFSROOT
#	options BOOTP_COMPAT
# and do a full build of the kernel.
# If you use the firewall, remember to default to open or your kernel
# will not be able to send/receive the bootp packets.
#
# On the server:
# enable NFS server and set /etc/exports as
#	${DEST}	-maproot=0 -alldirs <list of diskless clients>
#	/usr -alldirs
#
# enable bootpd by uncommenting the bootps line in /etc/inetd.conf
# and putting at least the following entries in /etc/bootptab:
#  .default:\
#	hn:ht=1:vm=rfc1048:\
#	:sm=255.255.255.0:\
#	:sa=${SERVER}:\
#	:gw=${GATEWAY}:\
#	:rp="${SERVER}:${DEST}":
#
#  client1:ha=0123456789ab:tc=.default
#
# and make sure that client1 is listed in /etc/hosts

# VARIABLES:
#	some manual init is needed here.
# DEST	the diskless_root dir (goes into /etc/bootptab and /etc/exports
#	on the server)
DEST=/diskless_root

# you should not touch these vars:
# SYSDIRS	system directories and mountpoints
# DIRS		mountpoints (empty dirs)
# PWFILES	files related to passwords
# TOCOPY	files and dirs to copy from root partition

SYSDIRS="dev proc root usr var"
DIRS="cdrom home mnt"
PWFILES="master.passwd passwd spwd.db pwd.db"
TOCOPY="bin boot compat etc modules sbin stand sys"

init_diskless_root() {
	echo "Cleaning old diskless root ($DEST)"
	cd /
	rm -rf ${DEST} && echo "Old diskless root removed."
	echo "Creating $DEST..."
	mkdir -p $DEST && echo "New diskless root created."
	echo "+++ Now copy original tree from / ..."
	ex=""
	(cd / ; tar -clf - ${TOCOPY} ) | (cd $DEST; tar xvf - )
	#(cd / ; find -x dev | cpio -o -H newc ) | \
	#	(cd $DEST; cpio -i -H newc -d )
	echo "+++ Fixing permissions on some objects"
	chmod 555 $DEST/sbin/init
}

update_conf_and_pw() {
	echo "+++ Copying files in /conf and password files"
	(cd ${DEST} ; rm -rf conf )
	(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 - )
}

update() {
	echo "+++ update: create mountpoints and device entries, kernel"
	for i in ${SYSDIRS} ${DIRS}
	do
	    rm -r -f ${DEST}/$i
	    mkdir -p ${DEST}/$i && chown root:wheel ${DEST}/$i && echo -n "$i "
	done
	echo "."
	ln -s /var/tmp ${DEST}/tmp
	echo "+++ Copying kernel from /sys/compile/DISKLESS"
	cp /sys/compile/DISKLESS/kernel $DEST/kernel
	echo "."
}


# Main entry point
case $1 in
	all)	# clean and reinstall the whole diskless_root
		init_diskless_root
		update
		update_conf_and_pw
		;;

	update)	# clean and rebuild mountpoints and device entries
		update
		update_conf_and_pw
		;;

	*)	# copy /conf and password files
		update_conf_and_pw
		;;
esac
exit 0
### end of file ###
@


1.5.2.1
log
@file clone_root was added on branch RELENG_8_4 on 2013-03-28 13:03:42 +0000
@
text
@d1 138
@


1.5.2.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248810
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 138
#!/bin/sh
#
# (C) 2001 Luigi Rizzo, Gabriele Cecchetti
#	<Standard BSD copyright>
# Revised 2001.04.16
#
# $FreeBSD: releng/8.4/share/examples/diskless/clone_root 159175 2006-06-02 15:01:11Z motoyuki $
#
# clone root filesystem for diskless root stuff
#
# usage
#	clone_root all		to do a full copy (e.g. bin, sbin...)
#	clone_root update	to recreate /var (including devices)
#	clone_root		to copy /conf and password-related files
#
# This script assumes that you use a shared readonly root and /usr
# partition. The script creates a partial clone of the root partition,
# and puts it into ${DEST} (defaults to /diskless_root ) on the server,
# where it is read.
#
# To run a diskless install you need to do the following:
#
# create /conf/default/etc/fstab
#    this will replace the standard /etc/fstab and should contain
#    as a minimum the following lines
#    ${SERVER}:${DEST} /     nfs    ro 0 0
#    ${SERVER}:/usr    /usr  nfs    ro 0 0
#    proc              /proc procfs rw 0 0
#
# create /conf/default/etc/rc.conf
#    this will replace the standard rc.conf and should contain
#    the startup options for the diskless client. Most likely
#    you will not need to set hostname and ifconfig_* because these
#    will be already set by the startup code. You will also
#    probably need to set local_startup="" so that the server's
#    local startup files will not be used.
#
# create a kernel config file in /sys/i386/conf/DISKLESS with
#	options MD_ROOT
#	options BOOTP
#	options BOOTP_NFSROOT
#	options BOOTP_COMPAT
# and do a full build of the kernel.
# If you use the firewall, remember to default to open or your kernel
# will not be able to send/receive the bootp packets.
#
# On the server:
# enable NFS server and set /etc/exports as
#	${DEST}	-maproot=0 -alldirs <list of diskless clients>
#	/usr -alldirs
#
# enable bootpd by uncommenting the bootps line in /etc/inetd.conf
# and putting at least the following entries in /etc/bootptab:
#  .default:\
#	hn:ht=1:vm=rfc1048:\
#	:sm=255.255.255.0:\
#	:sa=${SERVER}:\
#	:gw=${GATEWAY}:\
#	:rp="${SERVER}:${DEST}":
#
#  client1:ha=0123456789ab:tc=.default
#
# and make sure that client1 is listed in /etc/hosts

# VARIABLES:
#	some manual init is needed here.
# DEST	the diskless_root dir (goes into /etc/bootptab and /etc/exports
#	on the server)
DEST=/diskless_root

# you should not touch these vars:
# SYSDIRS	system directories and mountpoints
# DIRS		mountpoints (empty dirs)
# PWFILES	files related to passwords
# TOCOPY	files and dirs to copy from root partition

SYSDIRS="dev proc root usr var"
DIRS="cdrom home mnt"
PWFILES="master.passwd passwd spwd.db pwd.db"
TOCOPY="bin boot compat etc modules sbin stand sys"

init_diskless_root() {
	echo "Cleaning old diskless root ($DEST)"
	cd /
	rm -rf ${DEST} && echo "Old diskless root removed."
	echo "Creating $DEST..."
	mkdir -p $DEST && echo "New diskless root created."
	echo "+++ Now copy original tree from / ..."
	ex=""
	(cd / ; tar -clf - ${TOCOPY} ) | (cd $DEST; tar xvf - )
	#(cd / ; find -x dev | cpio -o -H newc ) | \
	#	(cd $DEST; cpio -i -H newc -d )
	echo "+++ Fixing permissions on some objects"
	chmod 555 $DEST/sbin/init
}

update_conf_and_pw() {
	echo "+++ Copying files in /conf and password files"
	(cd ${DEST} ; rm -rf conf )
	(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 - )
}

update() {
	echo "+++ update: create mountpoints and device entries, kernel"
	for i in ${SYSDIRS} ${DIRS}
	do
	    rm -r -f ${DEST}/$i
	    mkdir -p ${DEST}/$i && chown root:wheel ${DEST}/$i && echo -n "$i "
	done
	echo "."
	ln -s /var/tmp ${DEST}/tmp
	echo "+++ Copying kernel from /sys/compile/DISKLESS"
	cp /sys/compile/DISKLESS/kernel $DEST/kernel
	echo "."
}


# Main entry point
case $1 in
	all)	# clean and reinstall the whole diskless_root
		init_diskless_root
		update
		update_conf_and_pw
		;;

	update)	# clean and rebuild mountpoints and device entries
		update
		update_conf_and_pw
		;;

	*)	# copy /conf and password files
		update_conf_and_pw
		;;
esac
exit 0
### end of file ###
@


1.4
log
@doc fix: option MFS is obsolete. use MD_ROOT instead.

PR:	conf/93878
@
text
@d7 1
a7 1
# $FreeBSD$
@


1.4.2.1
log
@Switch importer
@
text
@d7 1
a7 1
# $FreeBSD: stable/7/share/examples/diskless/clone_root 159175 2006-06-02 15:01:11Z motoyuki $
@


1.4.16.1
log
@SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.4.16.2
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242902
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242902 | dteske | 2012-11-11 23:29:45 +0000 (Sun, 11 Nov 2012) | 10 lines
## SVN ##
## SVN ## Fix a regression introduced by SVN r211417 that saw the breakage of a feature
## SVN ## documented in usr.sbin/sysinstall/help/shortcuts.hlp (reproduced below):
## SVN ##
## SVN ## If /usr/sbin/sysinstall is linked to another filename, say
## SVN ## `/usr/local/bin/configPackages', then the basename will be used
## SVN ## as an implicit command name.
## SVN ##
## SVN ## Reviewed by:	adrian (co-mentor)
## SVN ## Approved by:	adrian (co-mentor)
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d7 1
a7 1
# $FreeBSD: stable/9/share/examples/diskless/clone_root 159175 2006-06-02 15:01:11Z motoyuki $
@


1.4.16.1.4.1
log
@SVN rev 239080 on 2012-08-05 23:54:33Z by kensmith

Copy stable/9 to releng/9.1 as part of the 9.1-RELEASE release process.

Approved by:	re (implicit)
@
text
@@


1.4.16.1.4.2
log
@Switch importer
@
text
@d7 1
a7 1
# $FreeBSD: releng/9.1/share/examples/diskless/clone_root 159175 2006-06-02 15:01:11Z motoyuki $
@


1.4.16.1.2.1
log
@SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)
@
text
@@


1.4.16.1.2.2
log
@Switch importer
@
text
@d7 1
a7 1
# $FreeBSD: releng/9.0/share/examples/diskless/clone_root 159175 2006-06-02 15:01:11Z motoyuki $
@


1.4.14.1
log
@SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith

Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release.

Approved by:	re (implicit)
@
text
@@


1.4.14.2
log
@Switch importer
@
text
@d7 1
a7 1
# $FreeBSD: releng/7.4/share/examples/diskless/clone_root 159175 2006-06-02 15:01:11Z motoyuki $
@


1.4.12.1
log
@SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith

Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process.

Approved by:	re (implicit)
@
text
@@


1.4.10.1
log
@SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith

Copy head to stable/8 as part of 8.0 Release cycle.

Approved by:	re (Implicit)
@
text
@@


1.4.10.2
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242909
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242909 | dim | 2012-11-12 07:47:19 +0000 (Mon, 12 Nov 2012) | 20 lines
## SVN ##
## SVN ## MFC r242625:
## SVN ##
## SVN ## Remove duplicate const specifiers in many drivers (I hope I got all of
## SVN ## them, please let me know if not).  Most of these are of the form:
## SVN ##
## SVN ## static const struct bzzt_type {
## SVN ##       [...list of members...]
## SVN ## } const bzzt_devs[] = {
## SVN ##       [...list of initializers...]
## SVN ## };
## SVN ##
## SVN ## The second const is unnecessary, as arrays cannot be modified anyway,
## SVN ## and if the elements are const, the whole thing is const automatically
## SVN ## (e.g. it is placed in .rodata).
## SVN ##
## SVN ## I have verified this does not change the binary output of a full kernel
## SVN ## build (except for build timestamps embedded in the object files).
## SVN ##
## SVN ## Reviewed by:	yongari, marius
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d7 1
a7 1
# $FreeBSD: stable/8/share/examples/diskless/clone_root 159175 2006-06-02 15:01:11Z motoyuki $
@


1.4.10.1.8.1
log
@SVN rev 232438 on 2012-03-03 06:15:13Z by kensmith

Copy stable/8 to releng/8.3 as part of 8.3-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.4.10.1.8.2
log
@Switch importer
@
text
@d7 1
a7 1
# $FreeBSD: releng/8.3/share/examples/diskless/clone_root 159175 2006-06-02 15:01:11Z motoyuki $
@


1.4.10.1.6.1
log
@SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)
@
text
@@


1.4.10.1.4.1
log
@SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)
@
text
@@


1.4.10.1.2.1
log
@SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith

Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure.

Approved by:	re (implicit)
@
text
@@


1.4.8.1
log
@SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith

Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.

Approved by:	re (implicit)
@
text
@@


1.4.6.1
log
@SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith

Create releng/7.1 in preparation for moving into RC phase of 7.1 release
cycle.

Approved by:	re (implicit)
@
text
@@


1.3
log
@Backout the hack to install mtree, newsyslog, and touch in the cloned
root in the previous commit.  We'll fix /etc/rc.d/var directly (someday).
@
text
@d39 1
a39 1
#	options MFS
@


1.3.2.1
log
@Switch importer
@
text
@d7 1
a7 1
# $FreeBSD: stable/6/share/examples/diskless/clone_root 135639 2004-09-23 21:17:31Z brooks $
@


1.3.12.1
log
@SVN rev 183531 on 2008-10-02 02:57:24Z by kensmith

Create releng/6.4 from stable/6 in preparation for 6.4-RC1.

Approved by:	re (implicit)
@
text
@@


1.2
log
@Hack around the fact that the current diskless scripts require some
binaries in /usr before /usr is mounted by copying those files to the
root.

Stop making devices.  devfs is manditory.
@
text
@a75 1
# USRBINS	binaries from /usr needed for tmp and var scripts
a80 1
USRBINS="/usr/sbin/mtree /usr/sbin/newsyslog /usr/bin/touch"
d90 1
a90 1
	(cd / ; tar -clf - ${TOCOPY} ${USRBINS} ) | (cd $DEST; tar xvf - )
@


1.1
log
@New script to help creation of shared readonly diskless partition.
It also has some instructions on how to setup the client and
the server. I have been using this code for over 2 years
on RELENG_3 and later RELENG_4. Have not tried on CURRENT, but
in case there are any issues these are in /etc/rc and
/etc/rc.diskless{12}
@
text
@a68 1
# DEVICES	device entries to create in /dev
a69 1
DEVICES="all snd1 bktr0"
d76 1
d82 1
d92 1
a92 1
	(cd / ; tar -clf - ${TOCOPY} ) | (cd $DEST; tar xvf - )
a115 4
	echo "+++ Now use MAKEDEV to create devices ${DEVICES}"
	(cd $DEST/dev ; cp /dev/MAKEDEV . )
	(cd $DEST/dev ; /dev/MAKEDEV ${DEVICES} )
	(cd $DEST/dev ; ln -s /dev/sysmouse mouse )
@


1.1.2.1
log
@MFC: bring in sample script to create a shared readonly root partition
for diskless client. With this, and the patches to /etc/rc and
/etc/rc.diskless2, diskless support should be working out of the
box on 4.3R

Approved-by: jkh
@
text
@@


1.1.2.2
log
@Make a copy of /etc into /conf/base for use during /etc/rc.diskless1
Add -ro in the example /etc/exports configuration.
@
text
@d49 2
a50 2
#	${DEST}	-ro -maproot=0 -alldirs <list of diskless clients>
#	/usr -ro -alldirs
a102 2
	mkdir -p ${DEST}/conf/base	# original copy of /etc
	(cd / ; tar clf - etc ) | (cd ${DEST}/conf/base && tar xvf - )
@


1.1.2.3
log
@Two [minor] performance fixes for diskless configurations:
when copying large trees into /etc and /dev, try to fetch the
content from a cpio archive if there is one available, so the
operation does not take multiple RTTs for each individual file.
clone_root has been updated to generate the cpio archives,
rc.diskless* to make use of them.

Not committed to -current yet because the relevant files are
already slightly different in the two branches, and I would like
to have a chance to test it there first before resyncing the two
versions.
@
text
@a106 4
	(cd ${DEST}/conf/base ; find etc | cpio --create -H newc | \
		gzip > ${DEST}/conf/base/etc.cpio.gz )
	(cd ${DEST} ; find dev | cpio --create -H newc | \
		gzip > ${DEST}/conf/dev.cpio.gz
@


1.1.2.4
log
@Add a missing parenthesis
@
text
@d110 1
a110 1
		gzip > ${DEST}/conf/dev.cpio.gz )
@


1.1.2.5
log
@Switch importer
@
text
@d7 1
a7 1
# $FreeBSD: stable/4/share/examples/diskless/clone_root 94144 2002-04-07 18:16:18Z luigi $
@


