misc/62417: diskless op script failed
Amagai Yoshiji
amagai at nue.org
Fri Feb 6 01:00:40 PST 2004
>Number: 62417
>Category: misc
>Synopsis: diskless op script failed
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Feb 06 01:00:34 PST 2004
>Closed-Date:
>Last-Modified:
>Originator: Amagai Yoshiji
>Release: 5.2 Release Patch level 2
>Organization:
New Unified Environment Research Project
>Environment:
FreeBSD ar.nue.org 5.2-RELEASE-p2 FreeBSD 5.2-RELEASE-p2 #0: Fri Feb 6 13:41:43 JST 2004 amagai at ar.nue.org:/usr/obj/usr/src/sys/AR i386
>Description:
A script /usr/share/example/diskless/clone_root is not follow 5.2R changes. The script not copy /lib and /libexec directories.
>How-To-Repeat:
sh /usr/share/example/diskless/clone_root all
>Fix:
ar# diff -c1 /usr/share/examples/diskless/clone_root clone_root
*** /usr/share/examples/diskless/clone_root Fri Feb 6 13:37:52 2004
--- clone_root Fri Feb 6 17:30:00 2004
***************
*** 6,8 ****
#
! # $FreeBSD: src/share/examples/diskless/clone_root,v 1.1 2001/04/16 06:37:03 luigi Exp $
#
--- 6,8 ----
#
! # $FreeBSD: src/share/examples/diskless/clone_root,v 1.1.2.4 2002/04/07 18:16:18 luigi Exp $
#
***************
*** 48,51 ****
# enable NFS server and set /etc/exports as
! # ${DEST} -maproot=0 -alldirs <list of diskless clients>
! # /usr -alldirs
#
--- 48,51 ----
# enable NFS server and set /etc/exports as
! # ${DEST} -ro -maproot=0 -alldirs <list of diskless clients>
! # /usr -ro -alldirs
#
***************
*** 81,83 ****
PWFILES="master.passwd passwd spwd.db pwd.db"
! TOCOPY="bin boot compat etc modules sbin stand sys"
--- 81,83 ----
PWFILES="master.passwd passwd spwd.db pwd.db"
! TOCOPY="bin boot compat etc modules sbin stand sys lib libexec"
***************
*** 102,105 ****
--- 102,111 ----
(cd / ; tar clf - conf ) | (cd ${DEST}; tar xvf - )
+ mkdir -p ${DEST}/conf/base # original copy of /etc
+ (cd / ; tar clf - etc ) | (cd ${DEST}/conf/base && tar xvf - )
mkdir -p ${DEST}/conf/etc # used to mount things
(cd /etc ; tar cvf - ${PWFILES} ) | (cd ${DEST}/etc ; tar xf - )
+ (cd ${DEST}/conf/base ; find etc | cpio --create -H newc | \
+ gzip > ${DEST}/conf/base/etc.cpio.gz ; rm -rf etc)
+ (cd ${DEST} ; find dev | cpio --create -H newc | \
+ gzip > ${DEST}/conf/dev.cpio.gz )
}
and this is a change request./etc/rc.d/initdiskless.
The original code does not copy .file (ex /root/.bashrc etc)
ar# diff -c1 initdiskless.save initdiskless
*** initdiskless.save Fri Feb 6 17:50:37 2004
--- initdiskless Fri Feb 6 17:50:48 2004
***************
*** 217,219 ****
create_md $subdir
! cp -Rp $j/* /$subdir
fi
--- 217,219 ----
create_md $subdir
! cp -Rp $j/ /$subdir
fi
======================================
Thank you.
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list