aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/tools/nanobsd/nanobsd.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/tools/tools/nanobsd/nanobsd.sh b/tools/tools/nanobsd/nanobsd.sh
index 9d3b9e559d01..054de5c7e008 100644
--- a/tools/tools/nanobsd/nanobsd.sh
+++ b/tools/tools/nanobsd/nanobsd.sh
@@ -75,6 +75,9 @@ NANO_KERNEL=GENERIC
# Customize commands.
NANO_CUSTOMIZE=""
+# Late customize commands.
+NANO_LATE_CUSTOMIZE=""
+
# Newfs paramters to use
NANO_NEWFS="-b 4096 -f 512 -i 8192 -O1 -U"
@@ -245,6 +248,18 @@ run_customize() (
done
)
+run_late_customize() (
+
+ echo "## run late customize scripts"
+ for c in $NANO_LATE_CUSTOMIZE
+ do
+ echo "## late customize \"$c\""
+ echo "### log: ${MAKEOBJDIRPREFIX}/_.late_cust.$c"
+ echo "### `type $c`"
+ ( $c ) > ${MAKEOBJDIRPREFIX}/_.late_cust.$c 2>&1
+ done
+)
+
setup_nanobsd ( ) (
echo "## configure nanobsd setup"
echo "### log: ${MAKEOBJDIRPREFIX}/_.dl"
@@ -570,6 +585,15 @@ customize_cmd () {
}
#######################################################################
+# Convenience function:
+# Register $1 as late customize function to run just before
+# image creation.
+
+late_customize_cmd () {
+ NANO_LATE_CUSTOMIZE="$NANO_LATE_CUSTOMIZE $1"
+}
+
+#######################################################################
#
# All set up to go...
#
@@ -717,6 +741,7 @@ install_kernel
run_customize
setup_nanobsd
prune_usr
+run_late_customize
if $do_image ; then
create_${NANO_ARCH}_diskimage
else