[system-tools-backends-clone] Set service priority to 50 when negative or null



commit 19c2c5436548696755d8c91d5c9a2fb0a402fc6e
Author: Milan Bouchet-Valat <nalimilan club fr>
Date:   Mon Sep 28 22:30:17 2009 +0200

    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.

 Init/Services.pm |    1 +
 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;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]