X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=chroot-script;h=bbd834f6b819b8d17a3502b269e54daf89f0c70c;hp=f20faf0a4aad247d6d15eb784498e50b24d23e4b;hb=c62dadf69387a747f3bb5f4e02ca1f62a9114382;hpb=f5daf2d5d3f48c97070786591b263fc5d12fefcc diff --git a/chroot-script b/chroot-script index f20faf0..bbd834f 100755 --- a/chroot-script +++ b/chroot-script @@ -419,15 +419,14 @@ services() { } # }}} -# unmount all filesystems in chroot, make sure nothing is left {{{ +# unmount /proc and make sure nothing is left {{{ finalize() { # make sure we don't leave any sensible data rm -f /etc/debootstrap/variables + [ -n "$POLICYRCD" ] && rm -f /usr/sbin/policy-rc.d - umount -a 1>/dev/null 2>/dev/null || true - umount /proc 1>/dev/null 2>/dev/null || true - umount /proc 1>/dev/null 2>/dev/null || true - umount -a 1>/dev/null 2>/dev/null || true + + umount /proc >/dev/null 2>/dev/null || true } # }}}