* 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.
|
# Set the hardware clock to the system time.
|
||||||
echo "setting the hardware clock..."
|
echo "setting the hardware clock..."
|
||||||
hwclock --systohc --utc
|
hwclock --systohc --utc
|
||||||
|
|
||||||
|
|
||||||
|
# Stop all swap devices.
|
||||||
|
swapoff -a
|
||||||
|
|
||||||
|
|
||||||
# Unmount helper functions.
|
# Unmount helper functions.
|
||||||
@ -99,7 +103,7 @@ with pkgs.lib;
|
|||||||
# `-i' is to workaround a bug in mount.cifs (it
|
# `-i' is to workaround a bug in mount.cifs (it
|
||||||
# doesn't recognise the `remount' option, and
|
# doesn't recognise the `remount' option, and
|
||||||
# instead mounts the FS again).
|
# 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.
|
# Note: don't use `umount -f'; it's very buggy.
|
||||||
# (For instance, when applied to a bind-mount it
|
# (For instance, when applied to a bind-mount it
|
||||||
@ -118,8 +122,8 @@ with pkgs.lib;
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
# Final sync.
|
# Final sync.
|
||||||
sync
|
sync
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user