summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdebootstrap.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/debootstrap.sh b/debootstrap.sh
index 520be3b..2ce7e2c 100755
--- a/debootstrap.sh
+++ b/debootstrap.sh
@@ -239,6 +239,7 @@ init()
239 suite=$1 239 suite=$1
240 variant=minbase 240 variant=minbase
241 arch=$(dpkg-architecture -q DEB_HOST_ARCH) || die "command 'dpkg-architecture' failed" 241 arch=$(dpkg-architecture -q DEB_HOST_ARCH) || die "command 'dpkg-architecture' failed"
242 running_suite=$(lsb_release -cs) || die 'lsb_release failed'
242 243
243 size=1G # truncate(1) format 244 size=1G # truncate(1) format
244 245
@@ -257,8 +258,12 @@ init()
257 mount -t btrfs "$target".tmp "$target".mnt || die "mount failed" 258 mount -t btrfs "$target".tmp "$target".mnt || die "mount failed"
258 trap 'umount "$target.mnt"' EXIT 259 trap 'umount "$target.mnt"' EXIT
259 260
260 debootstrap_efficiently "$arch" "$variant" "$suite" \ 261 if [ "$suite" = "$running_suite" -a -x ./src/selfstrap ]; then
261 "$target".mnt "${target%.btrfs}".debs.txt || die "debootstrap failed" 262 ./src/selfstrap -t "$target.mnt"
263 else
264 debootstrap_efficiently "$arch" "$variant" "$suite" \
265 "$target".mnt "${target%.btrfs}".debs.txt || die "debootstrap failed"
266 fi
262 267
263 if umount "$target".mnt 268 if umount "$target".mnt
264 then trap - EXIT 269 then trap - EXIT