* During shutdown, don't unmount mount points that don't exist (in the

current namespace).  This prevents warnings about the aufs/tmpfs
  mounts from the initrd used by the installation CD.

svn path=/nixos/branches/boot-order/; revision=22299
This commit is contained in:
Eelco Dolstra 2010-06-16 22:16:43 +00:00
parent eab5aff8d0
commit 69c7175404

View file

@ -89,7 +89,10 @@ with pkgs.lib;
cp /proc/mounts /dev/.mounts # don't read /proc/mounts while it's changing
exec 4< /dev/.mounts
while read -u 4 device mp fstype options rest; do
if [ "$mp" = /proc -o "$mp" = /sys -o "$mp" = /dev -o "$device" = "rootfs" -o "$mp" = /var/run ]; then continue; fi
# Skip various special filesystems. Non-existent
# mount points are typically tmpfs/aufs mounts from
# the initrd.
if [ "$mp" = /proc -o "$mp" = /sys -o "$mp" = /dev -o "$device" = "rootfs" -o "$mp" = /var/run -o ! -e "$mp" ]; then continue; fi
echo "unmounting $mp..."