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.
This commit is contained in:
parent
af128f2270
commit
97d20cdd9b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=291863
@ -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`
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user