diff options
author | phk <phk@FreeBSD.org> | 2008-08-09 09:37:44 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2008-08-09 09:37:44 +0000 |
commit | 10a0b4e5615cfa3aa974114a38939f59c4b62891 (patch) | |
tree | 8814f425c8db00275cb40d337ce84cbb648d9ee6 /tools | |
parent | 945ee4f0e9e659b700475cfb6ba66ac5402ea514 (diff) | |
download | FreeBSD-src-10a0b4e5615cfa3aa974114a38939f59c4b62891.zip FreeBSD-src-10a0b4e5615cfa3aa974114a38939f59c4b62891.tar.gz |
Add late customize hook
Submitted by: Patrick M. Hausen
Sat on for far too long: phk
Diffstat (limited to 'tools')
-rw-r--r-- | tools/tools/nanobsd/nanobsd.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tools/tools/nanobsd/nanobsd.sh b/tools/tools/nanobsd/nanobsd.sh index 9d3b9e5..054de5c 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 |