summaryrefslogtreecommitdiffstats
path: root/hooks/busybox/extract00.sh
diff options
context:
space:
mode:
Diffstat (limited to 'hooks/busybox/extract00.sh')
-rwxr-xr-xhooks/busybox/extract00.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/hooks/busybox/extract00.sh b/hooks/busybox/extract00.sh
new file mode 100755
index 0000000..7d9b6ec
--- /dev/null
+++ b/hooks/busybox/extract00.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -eu
+
+if [ "${MMDEBSTRAP_VERBOSITY:-1}" -ge 3 ]; then
+ set -x
+fi
+
+rootdir="$1"
+
+# Run busybox using an absolute path so that this script also works in case
+# /proc is not mounted. Busybox uses /proc/self/exe to figure out the path
+# to its executable.
+chroot "$rootdir" /bin/busybox --install -s