From deae2eefac455939c11d460b782c742327d0aa88 Mon Sep 17 00:00:00 2001 From: Lauri Tirkkonen Date: Fri, 8 Nov 2019 13:54:13 +0200 Subject: [PATCH] avoid copying more useless dirs to miniroot --- build_image.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/build_image.sh b/build_image.sh index 07f6410..376f8ae 100755 --- a/build_image.sh +++ b/build_image.sh @@ -139,7 +139,6 @@ if [ -n "$DEBUG" ]; then BIGROOT=1 fi CULL="python package/pkg snmp" -RMRF="/var/pkg /usr/share/man /usr/lib/python2.7 /usr/lib/iconv" ID=`id -u` if [[ "$ID" != "0" ]]; then @@ -267,9 +266,6 @@ EOF rm -f $ROOTDIR/$file fi done < <(cd $ROOTDIR && find ./ | cut -c3-) - for path in $RMRF ; do - rm -rf ${ROOTDIR}$path && echo " -- tossing $path" - done fi chkpt mkfs @@ -294,7 +290,11 @@ EOF "copy") pushd $ROOTDIR >/dev/null - /usr/bin/find . -not -path ./var/pkg'*' | /usr/bin/cpio -pdum $WORKDIR/mnt >/dev/null || fail "populate root" + /usr/bin/find . -not '(' -path ./var/pkg/'*' -or -path \ + ./usr/share/man/'*' -or -path ./usr/share/doc/'*' -or -path \ + ./usr/lib/python2.7/'*' -or -path ./usr/share/vim/'*' -or \ + -path ./usr/share/zoneinfo/'*' ')' \ + | /usr/bin/cpio -pdum $WORKDIR/mnt >/dev/null || fail "populate root" /usr/sbin/devfsadm -r $WORKDIR/mnt > /dev/null popd >/dev/null -- 2.11.4.GIT