added
authorRalph Ronnquist <ralph.ronnquist@gmail.com>
Mon, 28 Feb 2022 10:25:42 +0000 (21:25 +1100)
committerRalph Ronnquist <ralph.ronnquist@gmail.com>
Mon, 28 Feb 2022 10:25:42 +0000 (21:25 +1100)
bootstrap [new file with mode: 0644]

diff --git a/bootstrap b/bootstrap
new file mode 100644 (file)
index 0000000..3e7d628
--- /dev/null
+++ b/bootstrap
@@ -0,0 +1,32 @@
+#!/bin/bash
+#
+# debootstrap a subhost filesystem
+
+BASE="$(realpath $(dirname $0))"
+
+NAME=$1
+
+: ${SUBHOST=/opt/subhost}
+: ${TOP=$SUBHOST/$NAME}
+: ${OSROOT=$TOP/base}
+: ${TARGET=$TOP/live}
+: ${IMAGE=$TOP/$NAME.img}
+: ${UPPER=$TOP/root}
+: ${WORK=$TOP/work}
+: ${MOUNT=$TOP/mnt}
+: ${NSNAME=$NAME}
+: ${BRIDGES=lan_br}
+: ${CONFIG=$TOP/config}
+
+: ${SUITE=chimaera}
+: ${SOURCE=http://deb.devuan.org/merged}
+
+mkdir -p $TARGET $UPPER $WORK $MOUNT
+
+PKGS="less,psmisc,ifupdown,net-tools,iproute2,iputils-ping,procps"
+PKGS+=",man-db,manpages,manpages-dev,manpages-posix,manpages-posix-dev"
+
+debootstrap --no-merged-usr --variant=minbase --include="$PKGS" \
+           $SUITE $OSROOT $SOURCE
+
+cp -p $BASE/startup $OSROOT/