commit 131fcdfa1fb9ee8ceb83337513330e32b54b75f8
parent 7d24a066434de0564605c8fee42721718312ed9d
Author: Morel BĂ©renger <berenger.morel@neutralite.org>
Date: Sun, 24 Nov 2019 16:13:28 +0100
added some code to register all busybox applets to /usr/local
But remove run-parts since debian uses a more complete version and rc.d
scripts priorize /usr/local/bin to /usr/bin (which is probably a bug)
Diffstat:
M | mkiso.sh | | | 28 | +++++++++++++++++++++++++++- |
1 file changed, 27 insertions(+), 1 deletion(-)
diff --git a/mkiso.sh b/mkiso.sh
@@ -13,7 +13,19 @@ PKG_LIST="${PKG_LIST},ntpdate"
PKG_LIST="${PKG_LIST},dropbear-bin"
PKG_LIST="${PKG_LIST},debootstrap"
-debootstrap --no-merged-usr --variant=minbase "--include=$PKG_LIST" buster iso_dir
+if test "${stage:=DEBUG}" = "DEBUG"
+then
+ PKG_LIST="${PKG_LIST},psmisc"
+ cat <<EOF
+===========================
+== this is a debug setup ==
+===========================
+EOF
+fi
+
+BOOTSTRAPOPT="--no-merged-usr --variant=minbase"
+
+debootstrap $BOOTSTRAPOPT "--include=$PKG_LIST" buster iso_dir $MIRROR
cp -ar syslinux iso_dir
cp -ar etc/* iso_dir/etc
@@ -24,6 +36,20 @@ EOF
rm -r iso_dir/var/cache/apt/* iso_dir/var/log/*
+# install busybox applets as /usr/local/bin symlinks
+for link in $(LANG=C busybox --help | awk 'BEGIN{list=0}/Currently defined functions:/{list=1}/^\t/{if( list == 1 ) print}' | tr ',' '\n')
+do
+ test -n "$link" && ln -s /bin/busybox iso_dir/usr/local/bin/$link
+done
+
+# but since /usr/local/bin have higher priority than /usr/bin even for at least
+# some rc.d scripts, remove some...
+# TODO: I think this is actually a bug, should report it.
+for exclude in run-parts
+do
+ rm iso_dir/usr/local/bin/$exclude
+done
+
xorriso -as mkisofs \
-r -V 'CUSTOM_ISO_AMD64' \
-o custom.iso \