mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-21 12:52:41 +03:00
* Mark tasks such as mount-failed as not to be restarted.
svn path=/nixos/trunk/; revision=33237
This commit is contained in:
parent
362d1389d3
commit
4acc48fc2d
@ -121,7 +121,7 @@ done
|
|||||||
|
|
||||||
# Start all jobs that are not running but should be. The "should be"
|
# 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
|
# 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
|
# 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
|
# previously run, don't run it. If it's a service, only start it if
|
||||||
# it has a "start on" condition.
|
# it has a "start on" condition.
|
||||||
@ -134,6 +134,7 @@ for job in $(cd $newJobs && ls *.conf); do
|
|||||||
if [ ! -e "/var/run/upstart-jobs/$job" -o \
|
if [ ! -e "/var/run/upstart-jobs/$job" -o \
|
||||||
"$(readlink -f "$newJobs/$job.conf")" = "$(readlink -f "/var/run/upstart-jobs/$job")" ];
|
"$(readlink -f "$newJobs/$job.conf")" = "$(readlink -f "/var/run/upstart-jobs/$job")" ];
|
||||||
then continue; fi
|
then continue; fi
|
||||||
|
if ! grep -q "^# RESTART-IF-CHANGED" "$newJobs/$job.conf"; then continue; fi
|
||||||
echo "starting task ‘$job’..."
|
echo "starting task ‘$job’..."
|
||||||
start --quiet "$job" || true
|
start --quiet "$job" || true
|
||||||
else
|
else
|
||||||
|
@ -203,6 +203,7 @@ in
|
|||||||
jobs."mount-failed" =
|
jobs."mount-failed" =
|
||||||
{ task = true;
|
{ task = true;
|
||||||
startOn = "mount-failed";
|
startOn = "mount-failed";
|
||||||
|
restartIfChanged = false;
|
||||||
script =
|
script =
|
||||||
''
|
''
|
||||||
# Don't start the emergency shell if the X server is
|
# Don't start the emergency shell if the X server is
|
||||||
@ -225,6 +226,7 @@ in
|
|||||||
{
|
{
|
||||||
task = true;
|
task = true;
|
||||||
startOn = "ip-up";
|
startOn = "ip-up";
|
||||||
|
restartIfChanged = false;
|
||||||
script =
|
script =
|
||||||
''
|
''
|
||||||
# Send USR1 to the mountall process. Can't use "pkill
|
# Send USR1 to the mountall process. Can't use "pkill
|
||||||
@ -243,6 +245,8 @@ in
|
|||||||
jobs."emergency-shell" =
|
jobs."emergency-shell" =
|
||||||
{ task = true;
|
{ task = true;
|
||||||
|
|
||||||
|
restartIfChanged = false;
|
||||||
|
|
||||||
console = "owner";
|
console = "owner";
|
||||||
|
|
||||||
script =
|
script =
|
||||||
|
Loading…
Reference in New Issue
Block a user