* Be able to cope with future changes to Upstart.

svn path=/nixos/trunk/; revision=15312
This commit is contained in:
Eelco Dolstra 2009-04-25 22:36:56 +00:00
parent 5ac2532cc7
commit d9f4475dd5
4 changed files with 15 additions and 1 deletions

View File

@ -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.
";
};
};

View File

@ -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 <<EOF
Warning: the new NixOS configuration has an Upstart version that is
incompatible with the current version. The new configuration won't
take effect until you reboot the system.
EOF
exit 1
fi
oldEvents=$(readlink -f /etc/event.d || true)
newEvents=$(readlink -f @out@/etc/event.d)

View File

@ -408,6 +408,7 @@ rec {
pkgs.diffutils
pkgs.upstart # for initctl
];
upstartInterfaceVersion = pkgs.upstart.interfaceVersion;
# This attribute is responsible for creating boot entries for
# child configuration. They are only (directly) accessible
# when the parent configuration is boot default. For example,

View File

@ -13,6 +13,7 @@ ln -s $upstart $out/upstart
echo "$kernelParams" > $out/kernel-params
echo "$configurationName" > $out/configuration-name
echo "$upstartInterfaceVersion" > $out/upstart-interface-version
mkdir $out/fine-tune
ChildCount=0;