Date: Sun, 28 Apr 2013 21:44:45 +0000 (UTC) From: Nick Hibma <n_hibma@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r250034 - head/tools/tools/nanobsd Message-ID: <201304282144.r3SLijb6084464@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: n_hibma Date: Sun Apr 28 21:44:44 2013 New Revision: 250034 URL: http://svnweb.freebsd.org/changeset/base/250034 Log: Doing a cpio from /var/empty if dir was not specified or non-existent copies its mode to the destination. This is not desirable. Rephrase this code to be more sensible. PR: 173483 MFC after: 1 week Modified: head/tools/tools/nanobsd/nanobsd.sh Modified: head/tools/tools/nanobsd/nanobsd.sh ============================================================================== --- head/tools/tools/nanobsd/nanobsd.sh Sun Apr 28 21:14:23 2013 (r250033) +++ head/tools/tools/nanobsd/nanobsd.sh Sun Apr 28 21:44:44 2013 (r250034) @@ -413,12 +413,13 @@ populate_slice ( ) ( dir=$2 mnt=$3 lbl=$4 - test -z $2 && dir=${NANO_WORLDDIR}/var/empty - test -d $dir || dir=${NANO_WORLDDIR}/var/empty - echo "Creating ${dev} with ${dir} (mounting on ${mnt})" - newfs_part $dev $mnt $lbl - cd ${dir} - find . -print | grep -Ev '/(CVS|\.svn)' | cpio -dumpv ${mnt} + echo "Creating ${dev} (mounting on ${mnt})" + newfs_part ${dev} ${mnt} ${lbl} + if [ -n "${dir}" -a -d "${dir}" ]; then + echo "Populating ${lbl} from ${dir}" + cd ${dir} + find . -print | grep -Ev '/(CVS|\.svn)' | cpio -dumpv ${mnt} + fi df -i ${mnt} umount ${mnt} )
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304282144.r3SLijb6084464>