summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorsimon <simon@FreeBSD.org>2006-08-15 21:59:33 +0000
committersimon <simon@FreeBSD.org>2006-08-15 21:59:33 +0000
commit053be5b2220ae438c0fec8a9fc1ae9b20f5ce4d5 (patch)
tree460a306e126f45c534a77b11d3b13395ac43815a /tools
parente678605a6e7b336b875cedc4a4731efa45dccd3a (diff)
downloadFreeBSD-src-053be5b2220ae438c0fec8a9fc1ae9b20f5ce4d5.zip
FreeBSD-src-053be5b2220ae438c0fec8a9fc1ae9b20f5ce4d5.tar.gz
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
Diffstat (limited to 'tools')
-rw-r--r--tools/tools/nanobsd/nanobsd.sh32
1 files changed, 19 insertions, 13 deletions
diff --git a/tools/tools/nanobsd/nanobsd.sh b/tools/tools/nanobsd/nanobsd.sh
index a08f04e..063f4cb 100644
--- a/tools/tools/nanobsd/nanobsd.sh
+++ b/tools/tools/nanobsd/nanobsd.sh
@@ -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
OpenPOWER on IntegriCloud