mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-03-16 00:53:01 +00:00
* 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. svn path=/nixos/branches/boot-order/; revision=22179
This commit is contained in:
parent
48fdc931a4
commit
23cc979f61
|
@ -63,6 +63,10 @@ with pkgs.lib;
|
|||
# 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 @@ with pkgs.lib;
|
|||
# `-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 @@ with pkgs.lib;
|
|||
fi
|
||||
done
|
||||
done
|
||||
|
||||
|
||||
|
||||
|
||||
# Final sync.
|
||||
sync
|
||||
|
||||
|
|
Loading…
Reference in a new issue