summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilan Bouchet-Valat <nalimilan@club.fr>2009-09-28 22:30:17 +0200
committerMilan Bouchet-Valat <nalimilan@club.fr>2009-09-30 10:01:31 +0200
commit19c2c5436548696755d8c91d5c9a2fb0a402fc6e (patch)
tree8cc2c4fcd9beed9432910629f59159c3f1887c74
parent24ae335fbd828410cb3e7c082adba18ad068a4a7 (diff)
Set service priority to 50 when negative or null
This will prevent bad configuration from reaching the system. In addition, liboobs can now use priority 0 to mean "default value", so that the backends choose the default priority by themselves - GUI-side code should not deal with this.
-rw-r--r--Init/Services.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/Init/Services.pm b/Init/Services.pm
index b598bb7..f99e6f2 100644
--- a/Init/Services.pm
+++ b/Init/Services.pm
@@ -485,6 +485,7 @@ sub set_sysv_service
$runlevel = $$r[0];
$action = ($$r[1] == $SERVICE_START) ? "S" : "K";
$priority = sprintf ("%0.2d", $$r[2]);
+ $priority = "50" if ($$r[2] <= 0);
$configured_runlevels{$runlevel} = 1;