summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cady <d@cryptonomic.net>2022-01-11 02:07:02 -0500
committerAndrew Cady <d@cryptonomic.net>2022-01-11 02:08:52 -0500
commit6cdc4b2e18a22758fa6d42b12a8b04a5aa68551d (patch)
tree05975d528008f4bc5787bab63a9abccb3c37a5d9
parentb80ddd38bab7c88a0e0bfbb96d8d3bf55531000d (diff)
wtf is this shit
-rwxr-xr-xselfstrap7
1 files changed, 4 insertions, 3 deletions
diff --git a/selfstrap b/selfstrap
index 6e528da..fba576e 100755
--- a/selfstrap
+++ b/selfstrap
@@ -285,7 +285,7 @@ parse_apt_simul_line()
285 285
286dpkg_unpack() 286dpkg_unpack()
287{ 287{
288 [ "$TARGET" -a -d "$TARGET" ] || die 'no $TARGET' 288 [ "$TARGET" -a "$TARGET" != '/' -a -d "$TARGET" ] || die 'no $TARGET'
289 local deb="$1" multiarch="$2" SET_STATUS="$3" command PKG 289 local deb="$1" multiarch="$2" SET_STATUS="$3" command PKG
290 PKG=${deb##*/} 290 PKG=${deb##*/}
291 PKG=${PKG%%_*} 291 PKG=${PKG%%_*}
@@ -499,7 +499,8 @@ if [ "$REAL_APT_INSTALL" ]; then
499 499
500 # Unpack required packages. Handles (1) 500 # Unpack required packages. Handles (1)
501 # Note: populate_rootfs() already created a necessary symlink /usr/bin/awk -> /usr/bin/mawk 501 # Note: populate_rootfs() already created a necessary symlink /usr/bin/awk -> /usr/bin/mawk
502 apt_get install -y $required_packages eatmydata 502 apt_extract $required_packages eatmydata
503 # apt_get install -y $required_packages eatmydata
503 504
504 # This handles (2). 505 # This handles (2).
505 # An alternative (used by debootstrap) is to configure base-passwd 506 # An alternative (used by debootstrap) is to configure base-passwd
@@ -507,7 +508,7 @@ if [ "$REAL_APT_INSTALL" ]; then
507 508
508 prepare_chroot "$TARGET" 509 prepare_chroot "$TARGET"
509 trap 'cleanup_chroot "$TARGET"' EXIT 510 trap 'cleanup_chroot "$TARGET"' EXIT
510 apt_get install -y $EXTRA_PACKAGES 511 apt_get install -y $required_packages $EXTRA_PACKAGES
511else 512else
512 apt_extract $required_packages 513 apt_extract $required_packages
513 apt_extract $EXTRA_PACKAGES 514 apt_extract $EXTRA_PACKAGES