Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Aug 2007 18:43:05 -0700
From:      Sean Bruno <sbruno@miralink.com>
To:        freebsd-embedded@FreeBSD.org
Subject:   Nanobsd installing files into /root as user
Message-ID:  <46CF8929.4010106@miralink.com>

next in thread | raw e-mail | index | archive | help
An interesting accident happened while I was building my Nanobsd image 
that created /root and all files in /root with ownerships of me!

I have my FreeBSD src tree in subversion, so all files are owned by me.  
The image is built as root, so who cares right?  Well the following 
function cares:

#######################################################################
# Install the stuff under ./Files

cust_install_files () (
        cd ${NANO_TOOLS}/Files
        find . -print | grep -v /CVS | cpio -dumpv ${NANO_WORLDDIR}
)

Since /Files is in a tree owned by me, I had to recursively chown it 
back to root in my build.

so, install_files looks like this now:
#######################################################################
# Install the stuff under ./Files

cust_install_files () (
        cd ${NANO_TOOLS}/Files
        find . -print | grep -v /CVS | cpio -dumpv ${NANO_WORLDDIR}
        chown -R root:wheel ${NANO_WORLDDIR}/root
)

FYI for anyone crazy enough to do this in a method like mine.

Sean




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?46CF8929.4010106>