tar2fs: ensure proper cwd when cleaning up

...so that umounts can happen reliably.

Reported-by: Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
This commit is contained in:
Michael Shigorin 2018-08-02 21:50:16 +03:00
parent 45a2b09037
commit 27b07b2dca

View File

@ -134,6 +134,7 @@ fi
exit_handler() {
rc=$?
cd /
if [ -n "$ROOTFS" ]; then
umount ${BOOTFS:+"$BOOTFS"} "$ROOTFS"{/dev,/proc,/sys,}