From 69c71754041d0a4eaf807d1a1f33ea6852e04cd2 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 16 Jun 2010 22:16:43 +0000 Subject: [PATCH] * 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 --- modules/system/upstart-events/shutdown.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/system/upstart-events/shutdown.nix b/modules/system/upstart-events/shutdown.nix index 1b2b63cd9c0..b7a004724be 100644 --- a/modules/system/upstart-events/shutdown.nix +++ b/modules/system/upstart-events/shutdown.nix @@ -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..."