From d9f4475dd55dba9adfa28d83caeee6b320d3e3e7 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 25 Apr 2009 22:36:56 +0000 Subject: [PATCH] * Be able to cope with future changes to Upstart. svn path=/nixos/trunk/; revision=15312 --- system/options.nix | 2 +- system/switch-to-configuration.sh | 12 ++++++++++++ system/system.nix | 1 + system/system.sh | 1 + 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/system/options.nix b/system/options.nix index 0c0554897ee..9ce0daf9de7 100644 --- a/system/options.nix +++ b/system/options.nix @@ -847,7 +847,7 @@ in gatewayPorts = mkOption { default = "no"; description = " - Specifies whether remote hosts are allowed to connect to ports forwarded for the client. See man sshd_conf. + Specifies whether remote hosts are allowed to connect to ports forwarded for the client. See man sshd_conf. "; }; }; diff --git a/system/switch-to-configuration.sh b/system/switch-to-configuration.sh index dcca984282b..eaeb3106afd 100644 --- a/system/switch-to-configuration.sh +++ b/system/switch-to-configuration.sh @@ -35,6 +35,18 @@ fi if test "$action" = "switch" -o "$action" = "test"; then + oldVersion=$(cat /var/run/current-system/upstart-interface-version 2> /dev/null || echo 0) + newVersion=$(cat @out@/upstart-interface-version 2> /dev/null || echo 0) + + if test "$oldVersion" -ne "$newVersion"; then + cat < $out/kernel-params echo "$configurationName" > $out/configuration-name +echo "$upstartInterfaceVersion" > $out/upstart-interface-version mkdir $out/fine-tune ChildCount=0;