From 7071037db03ae4660ab024278e04b25ffd5ccda2 Mon Sep 17 00:00:00 2001 From: Luigi Rizzo Date: Fri, 15 Mar 2002 08:00:37 +0000 Subject: 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. --- share/examples/diskless/clone_root | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'share/examples') diff --git a/share/examples/diskless/clone_root b/share/examples/diskless/clone_root index aa15a93e53ac..8733f10f6fc4 100755 --- a/share/examples/diskless/clone_root +++ b/share/examples/diskless/clone_root @@ -104,6 +104,10 @@ update_conf_and_pw() { (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 ) + (cd ${DEST} ; find dev | cpio --create -H newc | \ + gzip > ${DEST}/conf/dev.cpio.gz } update() { -- cgit v1.3