]> err.no Git - systemd/commitdiff
sysv: handle suse style boot.d dirs
authorLennart Poettering <lennart@poettering.net>
Wed, 7 Apr 2010 16:46:49 +0000 (18:46 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 7 Apr 2010 16:46:49 +0000 (18:46 +0200)
manager.h
service.c

index 84cf18c3d3ddbf0fb02a554fa71edaba37d10be6..b6c0a51ecf1da67da58bf0ccacb1331b5bf6a5fd 100644 (file)
--- a/manager.h
+++ b/manager.h
@@ -82,7 +82,7 @@ struct Watch {
 #define SPECIAL_REMOTE_FS_TARGET "remote-fs.target"
 #define SPECIAL_SYSLOG_TARGET "syslog.target"             /* Should pull in syslog.socket or syslog.service */
 #define SPECIAL_RTC_SET_TARGET "rtc-set.target"           /* LSB's $time */
-#define SPECIAL_BASIC_SERVICE "basic.target"
+#define SPECIAL_BASIC_TARGET "basic.target"
 
 /* For SysV compatibility. Usually an alias for a saner target. On
  * SysV-free systems this doesn't exist. */
index fd36886fb11b8326977008d55817222e1c73272c..da1c5e78e2a1faa85d429fd6688bf640ea2efebf 100644 (file)
--- a/service.c
+++ b/service.c
 #define LINE_MAX 4096
 
 static const char * const rcnd_table[] = {
-        "/rc0.d", SPECIAL_RUNLEVEL0_TARGET,
-        "/rc1.d", SPECIAL_RUNLEVEL1_TARGET,
-        "/rc2.d", SPECIAL_RUNLEVEL2_TARGET,
-        "/rc3.d", SPECIAL_RUNLEVEL3_TARGET,
-        "/rc4.d", SPECIAL_RUNLEVEL4_TARGET,
-        "/rc5.d", SPECIAL_RUNLEVEL5_TARGET,
-        "/rc6.d", SPECIAL_RUNLEVEL6_TARGET
+        "/rc0.d",  SPECIAL_RUNLEVEL0_TARGET,
+        "/rc1.d",  SPECIAL_RUNLEVEL1_TARGET,
+        "/rc2.d",  SPECIAL_RUNLEVEL2_TARGET,
+        "/rc3.d",  SPECIAL_RUNLEVEL3_TARGET,
+        "/rc4.d",  SPECIAL_RUNLEVEL4_TARGET,
+        "/rc5.d",  SPECIAL_RUNLEVEL5_TARGET,
+        "/rc6.d",  SPECIAL_RUNLEVEL6_TARGET,
+        "/boot.d", SPECIAL_BASIC_TARGET
 };
 
 static const UnitActiveState state_translation_table[_SERVICE_STATE_MAX] = {
@@ -564,8 +565,8 @@ static int service_load_sysv_path(Service *s, const char *path, UnitLoadState *n
         if ((r = sysv_exec_commands(s)) < 0)
                 goto finish;
 
-        if ((r = unit_add_dependency_by_name(u, UNIT_REQUIRES, SPECIAL_BASIC_SERVICE)) < 0 ||
-            (r = unit_add_dependency_by_name(u, UNIT_AFTER, SPECIAL_BASIC_SERVICE)) < 0)
+        if ((r = unit_add_dependency_by_name(u, UNIT_REQUIRES, SPECIAL_BASIC_TARGET)) < 0 ||
+            (r = unit_add_dependency_by_name(u, UNIT_AFTER, SPECIAL_BASIC_TARGET)) < 0)
                 goto finish;
 
         *new_state = UNIT_LOADED;