diff options
-rwxr-xr-x | selfstrap | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -151,7 +151,7 @@ install_devices() | |||
151 | idem ln -s /proc/self/fd/2 "$TARGET"/dev/stderr | 151 | idem ln -s /proc/self/fd/2 "$TARGET"/dev/stderr |
152 | } | 152 | } |
153 | 153 | ||
154 | mount_virtfs() | 154 | prepare_chroot() |
155 | { | 155 | { |
156 | [ "$TARGET" ] || die 'no $TARGET' | 156 | [ "$TARGET" ] || die 'no $TARGET' |
157 | [ -d "$TARGET"/proc ] || mkdir "$TARGET"/proc | 157 | [ -d "$TARGET"/proc ] || mkdir "$TARGET"/proc |
@@ -160,7 +160,7 @@ mount_virtfs() | |||
160 | mount -t sysfs sysfs "$TARGET"/sys | 160 | mount -t sysfs sysfs "$TARGET"/sys |
161 | } | 161 | } |
162 | 162 | ||
163 | umount_virtfs() | 163 | cleanup_chroot() |
164 | { | 164 | { |
165 | [ "$TARGET" ] || die 'no $TARGET' | 165 | [ "$TARGET" ] || die 'no $TARGET' |
166 | umount "$TARGET"/proc || fail=y | 166 | umount "$TARGET"/proc || fail=y |
@@ -312,7 +312,9 @@ dpkg_configure_from_apt_actions() | |||
312 | preinst=/var/lib/dpkg/info/${package}${multiarch}.preinst | 312 | preinst=/var/lib/dpkg/info/${package}${multiarch}.preinst |
313 | if [ -x "$TARGET"/"$preinst" ]; then | 313 | if [ -x "$TARGET"/"$preinst" ]; then |
314 | extract_tmp_ci "$deb" | 314 | extract_tmp_ci "$deb" |
315 | prepare_chroot "$TARGET" | ||
315 | verbosely ${CHROOT_PROG:-chroot} "$TARGET" "$preinst" install | 316 | verbosely ${CHROOT_PROG:-chroot} "$TARGET" "$preinst" install |
317 | cleanup_chroot "$TARGET" | ||
316 | remove_tmp_ci | 318 | remove_tmp_ci |
317 | fi | 319 | fi |
318 | ;; | 320 | ;; |
@@ -321,7 +323,9 @@ dpkg_configure_from_apt_actions() | |||
321 | postinst=/var/lib/dpkg/info/${package}${multiarch}.postinst | 323 | postinst=/var/lib/dpkg/info/${package}${multiarch}.postinst |
322 | if [ -x "$TARGET"/"$postinst" ]; then | 324 | if [ -x "$TARGET"/"$postinst" ]; then |
323 | extract_tmp_ci "$deb" | 325 | extract_tmp_ci "$deb" |
326 | prepare_chroot "$TARGET" | ||
324 | verbosely ${CHROOT_PROG:-chroot} "$TARGET" "$postinst" configure | 327 | verbosely ${CHROOT_PROG:-chroot} "$TARGET" "$postinst" configure |
328 | cleanup_chroot "$TARGET" | ||
325 | remove_tmp_ci | 329 | remove_tmp_ci |
326 | fi | 330 | fi |
327 | ;; | 331 | ;; |