Date: Thu, 8 Nov 2012 20:27:58 GMT From: Nick Hibma <nick@anywi.com> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/173483: NanoBSD initialises /cfg incorrectly (wrong permissions) Message-ID: <201211082027.qA8KRwYl063260@red.freebsd.org> Resent-Message-ID: <201211082030.qA8KU1Ga067214@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 173483 >Category: misc >Synopsis: NanoBSD initialises /cfg incorrectly (wrong permissions) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Nov 08 20:30:01 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Nick Hibma >Release: 8.3-RELEASE >Organization: AnyWi Technologies >Environment: System: FreeBSD bitske2.localdomain 8.3-RELEASE FreeBSD 8.3-RELEASE #0 r242660: Tue Nov 6 16:23:23 CET 2012 root@bitske2.localdomain:/usr/obj/usr/src/sys/GENERIC i386 >Description: /cfg is initialised from /var/empty in NANO_CFGDIR is unset. This also copies the 0555 permissions from this dir to /cfg. >How-To-Repeat: Build an image using NanoBSD with NANO_CFGDIR="" . >Fix: Index: nanobsd.sh =================================================================== --- nanobsd.sh (revision 12226) +++ nanobsd.sh (working copy) @@ -413,12 +413,13 @@ 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} ) >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211082027.qA8KRwYl063260>