svn commit: r291863 - in head/tools/tools/nanobsd: . embedded
Warner Losh
imp at FreeBSD.org
Sat Dec 5 17:40:13 UTC 2015
Author: imp
Date: Sat Dec 5 17:40:11 2015
New Revision: 291863
URL: https://svnweb.freebsd.org/changeset/base/291863
Log:
When building no-priv, chmod etc/defaults/rc.conf before appending to
it and then chmod back. There's no chmod -push / chmod -pop so hard
code 444 as the right permissions here.
Also, fix more stray detritus that crept in (out?) while re-arranging
the deck chairs.
Modified:
head/tools/tools/nanobsd/defaults.sh (contents, props changed)
head/tools/tools/nanobsd/embedded/common
Modified: head/tools/tools/nanobsd/defaults.sh
==============================================================================
--- head/tools/tools/nanobsd/defaults.sh Sat Dec 5 17:11:14 2015 (r291862)
+++ head/tools/tools/nanobsd/defaults.sh Sat Dec 5 17:40:11 2015 (r291863)
@@ -490,7 +490,9 @@ setup_nanobsd_etc ( ) (
touch etc/diskless
# Make root filesystem R/O by default
+ [ ! -z "${NANO_NOPRIV_BUILD}" ] && chmod 666 etc/defaults/rc.conf
echo "root_rw_mount=NO" >> etc/defaults/rc.conf
+ [ ! -z "${NANO_NOPRIV_BUILD}" ] && chmod 444 etc/defaults/rc.conf
# save config file for scripts
echo "NANO_DRIVE=${NANO_DRIVE}" > etc/nanobsd.conf
@@ -961,7 +963,7 @@ set_defaults_and_export ( ) {
[ ! -d "${NANO_TOOLS}" ] && [ -d "${NANO_SRC}/${NANO_TOOLS}" ] && \
NANO_TOOLS="${NANO_SRC}/${NANO_TOOLS}" || true
- [ ! -z "${NANO_NOPRIV_BUILD}" ] && [ -z "${NANO_METALOG}"] && \
+ [ ! -z "${NANO_NOPRIV_BUILD}" ] && [ -z "${NANO_METALOG}" ] && \
NANO_METALOG=${NANO_OBJ}/_.metalog || true
NANO_STARTTIME=`date +%s`
Modified: head/tools/tools/nanobsd/embedded/common
==============================================================================
--- head/tools/tools/nanobsd/embedded/common Sat Dec 5 17:11:14 2015 (r291862)
+++ head/tools/tools/nanobsd/embedded/common Sat Dec 5 17:40:11 2015 (r291863)
@@ -357,7 +357,7 @@ create_diskimage ( ) (
# s1 is cfg, s2 is /, not sure how to make that
# boot (marked as active) with mkimg yet
mkimg -s mbr -p ${s1}:=${NANO_OBJ}/_.s1 \
- -p ${s2}:=${NANO_OBJ}/_.s2
+ -p ${s2}:=${NANO_OBJ}/_.s2 \
-o ${NANO_OBJ}/_.disk.image.${NANO_NAME}
fi
) > ${NANO_OBJ}/_.di 2>&1
More information about the svn-src-head
mailing list