Author: eelco
Date: Sun Mar 18 18:04:49 2012
New Revision: 33237
URL: https://nixos.org/websvn/nix/?rev=33237&sc=1
Log:
* Mark tasks such as mount-failed as not to be restarted.
Modified:
nixos/trunk/modules/system/activation/switch-to-configuration.sh
nixos/trunk/modules/tasks/filesystems.nix
Modified: nixos/trunk/modules/system/activation/switch-to-configuration.sh
==============================================================================
--- nixos/trunk/modules/system/activation/switch-to-configuration.sh Sun Mar
18 17:48:19 2012 (r33236)
+++ nixos/trunk/modules/system/activation/switch-to-configuration.sh Sun Mar
18 18:04:49 2012 (r33237)
@@ -121,7 +121,7 @@
# Start all jobs that are not running but should be. The "should be"
# criterion is tricky: the intended semantics is that we end up with
-# the same jobs as after a reboot. If it's a task, restart it if it
+# the same jobs as after a reboot. If it's a task, start it if it
# differs from the previous instance of the same task; if it wasn't
# previously run, don't run it. If it's a service, only start it if
# it has a "start on" condition.
@@ -134,6 +134,7 @@
if [ ! -e "/var/run/upstart-jobs/$job" -o \
"$(readlink -f "$newJobs/$job.conf")" = "$(readlink -f
"/var/run/upstart-jobs/$job")" ];
then continue; fi
+ if ! grep -q "^# RESTART-IF-CHANGED" "$newJobs/$job.conf"; then
continue; fi
echo "starting task ‘$job’..."
start --quiet "$job" || true
else
Modified: nixos/trunk/modules/tasks/filesystems.nix
==============================================================================
--- nixos/trunk/modules/tasks/filesystems.nix Sun Mar 18 17:48:19 2012
(r33236)
+++ nixos/trunk/modules/tasks/filesystems.nix Sun Mar 18 18:04:49 2012
(r33237)
@@ -203,6 +203,7 @@
jobs."mount-failed" =
{ task = true;
startOn = "mount-failed";
+ restartIfChanged = false;
script =
''
# Don't start the emergency shell if the X server is
@@ -225,6 +226,7 @@
{
task = true;
startOn = "ip-up";
+ restartIfChanged = false;
script =
''
# Send USR1 to the mountall process. Can't use "pkill
@@ -243,6 +245,8 @@
jobs."emergency-shell" =
{ task = true;
+ restartIfChanged = false;
+
console = "owner";
script =
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits