From 2d20b19e5bc6c5c6ebeb1937f63b6a625b5f0e5b Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 9 Jan 2007 09:52:16 +0000 Subject: [PATCH] * Don't get stuck in an infinite unmount loop on shutdown. svn path=/nixos/trunk/; revision=7580 --- upstart-jobs/halt.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/upstart-jobs/halt.nix b/upstart-jobs/halt.nix index f24904e723bc..719b01258ff8 100644 --- a/upstart-jobs/halt.nix +++ b/upstart-jobs/halt.nix @@ -47,8 +47,10 @@ script for mp in $(getMountPoints); do device=$(getDevice $mp) echo \"unmounting $mp...\" - if umount -n -r \"$mp\"; then + if umount -n \"$mp\"; then if test \"$mp\" != /; then tryAgain=1; fi + else + mount -n -o remount,ro \"$mp\" fi # Hack: work around a bug in mount (mount -o remount on a