Author: eelco
Date: 2010-06-08 10:06:00 +0000 (Tue, 08 Jun 2010)
New Revision: 22179

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

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

Log:
* Run `swapoff -a' during shutdown.  Otherwise filesystems containing
  swapfiles cannot be unmounted or even remounted read-only.
* In the remount, pass `-t none' to get a more informative error
  message if the filesystem is in use.


Changes:

Modified: nixos/branches/boot-order/modules/system/upstart-events/shutdown.nix
===================================================================
--- nixos/branches/boot-order/modules/system/upstart-events/shutdown.nix        
2010-06-08 06:29:02 UTC (rev 22178)
+++ nixos/branches/boot-order/modules/system/upstart-events/shutdown.nix        
2010-06-08 10:06:00 UTC (rev 22179)
@@ -63,6 +63,10 @@
           # Set the hardware clock to the system time.
           echo "setting the hardware clock..."
           hwclock --systohc --utc
+
+
+          # Stop all swap devices.
+          swapoff -a
       
       
           # Unmount helper functions.
@@ -99,7 +103,7 @@
                   # `-i' is to workaround a bug in mount.cifs (it
                   # doesn't recognise the `remount' option, and
                   # instead mounts the FS again).
-                  mount -n -i -o remount,ro "$mp"
+                  mount -t none -n -i -o remount,ro none "$mp"
 
                   # Note: don't use `umount -f'; it's very buggy.
                   # (For instance, when applied to a bind-mount it
@@ -118,8 +122,8 @@
                   fi
               done
           done
-      
-      
+
+
           # Final sync.
           sync
       

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

Reply via email to