mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-01 17:12:46 +00:00
Add late customize hook
Submitted by: Patrick M. Hausen Sat on for far too long: phk
This commit is contained in:
parent
36a6be7fc9
commit
1d09f2b98a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=181461
@ -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"
|
||||
@ -569,6 +584,15 @@ customize_cmd () {
|
||||
NANO_CUSTOMIZE="$NANO_CUSTOMIZE $1"
|
||||
}
|
||||
|
||||
#######################################################################
|
||||
# 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
|
||||
|
Loading…
Reference in New Issue
Block a user