summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/tools/nanobsd/Makefile11
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/tools/nanobsd/Makefile b/tools/tools/nanobsd/Makefile
index 5866ee82262d..371b352f50e0 100644
--- a/tools/tools/nanobsd/Makefile
+++ b/tools/tools/nanobsd/Makefile
@@ -43,13 +43,18 @@ all: buildworld installworld buildimage
Customize: _.cs
_.cs: _.iw _.di _.ik _.di
echo "/dev/ad0s1a / ufs ro 1 1" > ${WD}/etc/fstab
-.if exists(${CUSTOMIZE})
- sh -e ${CUSTOMIZE} ${WD} ${WORLDDIR} ${.CURDIR}
-.else
+.if empty(CUSTOMIZE)
# useful stuff for diskless boot
sed -i "" -e /beastie/d ${WD}/boot/loader.rc
sed -i "" -e /ttyd0/s/off/on/ ${WD}/etc/ttys
echo " -h" > ${WD}/boot.config
+.elif exists(${CUSTOMIZE})
+ sh -e ${CUSTOMIZE} ${WD} ${WORLDDIR} ${.CURDIR}
+.elif exists(${.CURDIR}/${CUSTOMIZE})
+ sh -e ${.CURDIR}/${CUSTOMIZE} ${WD} ${WORLDDIR} ${.CURDIR}
+.else
+ echo "CUSTOMIZE script not found" 1>&2
+ false
.endif
touch _.cs