Author: eelco
Date: 2010-06-16 22:16:43 +0000 (Wed, 16 Jun 2010)
New Revision: 22299

You can view the changes in this commit at:
   https://svn.nixos.org/viewvc/nix?rev=22299&view=rev

Modified:
   nixos/branches/boot-order/modules/system/upstart-events/shutdown.nix

Log:
* 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.


Changes:

Modified: nixos/branches/boot-order/modules/system/upstart-events/shutdown.nix
===================================================================
--- nixos/branches/boot-order/modules/system/upstart-events/shutdown.nix        
2010-06-16 20:53:57 UTC (rev 22298)
+++ nixos/branches/boot-order/modules/system/upstart-events/shutdown.nix        
2010-06-16 22:16:43 UTC (rev 22299)
@@ -89,7 +89,10 @@
               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..."
 

_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to