free attached loop devices
parent
141d6d6b75
commit
4aa6efead7
|
|
@ -64,6 +64,10 @@ if [ "$1" = "--init" ]; then
|
||||||
setsid sh -c 'exec sh < /dev/tty1 >/dev/tty1 2>&1'
|
setsid sh -c 'exec sh < /dev/tty1 >/dev/tty1 2>&1'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# make sure to detach loop devices which can be detached at this moment,
|
||||||
|
# else they would block unmounting later.
|
||||||
|
losetup | cut -d : -f 1 | xargs -n 1 losetup -d
|
||||||
|
|
||||||
# next, unmount everything from union, backwards
|
# next, unmount everything from union, backwards
|
||||||
tac /proc/mounts | grep union | cut -d " " -f 2 | while read LINE; do
|
tac /proc/mounts | grep union | cut -d " " -f 2 | while read LINE; do
|
||||||
umount $LINE >/dev/console 2>&1
|
umount $LINE >/dev/console 2>&1
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue