Move the setup of "diskless" /etc magic files from install_etc() to a
separate function which is called right after install_etc(). This makes it simpler to (ab)use nanobsd.sh as a framework to build more normal FreeBSD images where a normal /etc is used, since setup_nanobsd_etc() can just be redefined. OK'ed in principle by: phk MFC after: 1 week
This commit is contained in:
parent
a08875fbb2
commit
22eb0575f2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=161341
@ -196,19 +196,6 @@ install_etc ( ) (
|
||||
${NANO_PMAKE} __MAKE_CONF=${NANO_MAKE_CONF} distribution \
|
||||
DESTDIR=${NANO_WORLDDIR} \
|
||||
> ${MAKEOBJDIRPREFIX}/_.etc 2>&1
|
||||
(
|
||||
cd ${NANO_WORLDDIR}
|
||||
|
||||
# create diskless marker file
|
||||
touch etc/diskless
|
||||
|
||||
# save config file for scripts
|
||||
echo "NANO_DRIVE=${NANO_DRIVE}" > etc/nanobsd.conf
|
||||
|
||||
echo "/dev/${NANO_DRIVE}s1a / ufs ro 1 1" > etc/fstab
|
||||
echo "/dev/${NANO_DRIVE}s3 /cfg ufs rw,noauto 2 2" >> etc/fstab
|
||||
mkdir -p cfg
|
||||
)
|
||||
)
|
||||
|
||||
install_kernel ( ) (
|
||||
@ -265,6 +252,24 @@ setup_nanobsd ( ) (
|
||||
) > ${MAKEOBJDIRPREFIX}/_.dl 2>&1
|
||||
)
|
||||
|
||||
setup_nanobsd_etc ( ) (
|
||||
echo "## configure nanobsd /etc"
|
||||
|
||||
(
|
||||
cd ${NANO_WORLDDIR}
|
||||
|
||||
# create diskless marker file
|
||||
touch etc/diskless
|
||||
|
||||
# save config file for scripts
|
||||
echo "NANO_DRIVE=${NANO_DRIVE}" > etc/nanobsd.conf
|
||||
|
||||
echo "/dev/${NANO_DRIVE}s1a / ufs ro 1 1" > etc/fstab
|
||||
echo "/dev/${NANO_DRIVE}s3 /cfg ufs rw,noauto 2 2" >> etc/fstab
|
||||
mkdir -p cfg
|
||||
)
|
||||
)
|
||||
|
||||
prune_usr() (
|
||||
|
||||
# Remove all empty directories in /usr
|
||||
@ -590,6 +595,7 @@ clean_world
|
||||
make_conf_install
|
||||
install_world
|
||||
install_etc
|
||||
setup_nanobsd_etc
|
||||
install_kernel
|
||||
|
||||
run_customize
|
||||
|
Loading…
Reference in New Issue
Block a user