* Remove loopback devices during shutdown, since they may prevent
filesystems from being unmounted. svn path=/nixos/trunk/; revision=30203
This commit is contained in:
parent
aac71e8f95
commit
a4d2682238
@ -88,6 +88,13 @@ with pkgs.lib;
|
|||||||
tryAgain=
|
tryAgain=
|
||||||
failed= # list of mount points that couldn't be unmounted/remounted
|
failed= # list of mount points that couldn't be unmounted/remounted
|
||||||
|
|
||||||
|
# Get rid of loopback devices.
|
||||||
|
loDevices=$(losetup -a | sed 's#^\(/dev/loop[0-9]\+\).*#\1#')
|
||||||
|
if [ -n "$loDevices" ]; then
|
||||||
|
echo "removing loopback devices $loDevices..."
|
||||||
|
losetup -d $loDevices
|
||||||
|
fi
|
||||||
|
|
||||||
cp /proc/mounts /dev/.mounts # don't read /proc/mounts while it's changing
|
cp /proc/mounts /dev/.mounts # don't read /proc/mounts while it's changing
|
||||||
exec 4< /dev/.mounts
|
exec 4< /dev/.mounts
|
||||||
while read -u 4 device mp fstype options rest; do
|
while read -u 4 device mp fstype options rest; do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user