From 1949a8598739573d8b9b165dcd7b9051b3f05492 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 23 Mar 2012 12:29:11 +0000 Subject: [PATCH] * Do a sync before switching to a new configuration. svn path=/nixos/trunk/; revision=33381 --- modules/installer/tools/nixos-rebuild.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/installer/tools/nixos-rebuild.sh b/modules/installer/tools/nixos-rebuild.sh index c2210b62939..6fc9014027d 100644 --- a/modules/installer/tools/nixos-rebuild.sh +++ b/modules/installer/tools/nixos-rebuild.sh @@ -188,6 +188,9 @@ fi # If we're not just building, then make the new configuration the boot # default and/or activate it now. if test "$action" = switch -o "$action" = boot -o "$action" = test; then + # Just in case the new configuration hangs the system, do a sync now. + sync + $pathToConfig/bin/switch-to-configuration "$action" fi