chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
dfd8eee
)
service: honour suse style Kxx links in boot.d/ directory
author
Lennart Poettering
<lennart@poettering.net>
Mon, 7 Jun 2010 00:42:01 +0000
(
02:42
+0200)
committer
Lennart Poettering
<lennart@poettering.net>
Mon, 7 Jun 2010 00:42:01 +0000
(
02:42
+0200)
src/service.c
patch
|
blob
|
history
diff --git
a/src/service.c
b/src/service.c
index 8b1fab785ac364e287befcbe14bfda708c501d08..651f7c82ca484e730bc587c427c5cc15456bddf3 100644
(file)
--- a/
src/service.c
+++ b/
src/service.c
@@
-40,7
+40,7
@@
typedef enum RunlevelType {
RUNLEVEL_UP,
RUNLEVEL_DOWN,
typedef enum RunlevelType {
RUNLEVEL_UP,
RUNLEVEL_DOWN,
- RUNLEVEL_
BASIC
+ RUNLEVEL_
SYSINIT
} RunlevelType;
static const struct {
} RunlevelType;
static const struct {
@@
-58,10
+58,10
@@
static const struct {
{ "rc6.d", SPECIAL_RUNLEVEL6_TARGET, RUNLEVEL_DOWN },
/* SUSE style boot.d */
{ "rc6.d", SPECIAL_RUNLEVEL6_TARGET, RUNLEVEL_DOWN },
/* SUSE style boot.d */
- { "boot.d", SPECIAL_SYSINIT_TARGET, RUNLEVEL_
BASIC
},
+ { "boot.d", SPECIAL_SYSINIT_TARGET, RUNLEVEL_
SYSINIT
},
/* Debian style rcS.d */
/* Debian style rcS.d */
- { "rcS.d", SPECIAL_SYSINIT_TARGET, RUNLEVEL_
BASIC
},
+ { "rcS.d", SPECIAL_SYSINIT_TARGET, RUNLEVEL_
SYSINIT
},
};
#define RUNLEVELS_UP "12345"
};
#define RUNLEVELS_UP "12345"
@@
-2268,7
+2268,7
@@
static int service_enumerate(Manager *m) {
}
if (de->d_name[0] == 'S' &&
}
if (de->d_name[0] == 'S' &&
- (rcnd_table[i].type == RUNLEVEL_UP || rcnd_table[i].type == RUNLEVEL_
BASIC
))
+ (rcnd_table[i].type == RUNLEVEL_UP || rcnd_table[i].type == RUNLEVEL_
SYSINIT
))
SERVICE(service)->sysv_start_priority =
MAX(a*10 + b, SERVICE(service)->sysv_start_priority);
SERVICE(service)->sysv_start_priority =
MAX(a*10 + b, SERVICE(service)->sysv_start_priority);
@@
-2287,7
+2287,9
@@
static int service_enumerate(Manager *m) {
if ((r = unit_add_dependency(service, UNIT_BEFORE, runlevel_target, true)) < 0)
goto finish;
if ((r = unit_add_dependency(service, UNIT_BEFORE, runlevel_target, true)) < 0)
goto finish;
- } else if (de->d_name[0] == 'K' && rcnd_table[i].type == RUNLEVEL_DOWN) {
+ } else if (de->d_name[0] == 'K' &&
+ (rcnd_table[i].type == RUNLEVEL_DOWN ||
+ rcnd_table[i].type == RUNLEVEL_SYSINIT)) {
Unit *shutdown_target;
/* We honour K links only for
Unit *shutdown_target;
/* We honour K links only for
@@
-2299,7
+2301,12
@@
static int service_enumerate(Manager *m) {
* really distuingish here
* between the runlevels 0 and
* 6 and just add them to the
* really distuingish here
* between the runlevels 0 and
* 6 and just add them to the
- * special shutdown target. */
+ * special shutdown target. On
+ * SUSE the boot.d/ runlevel
+ * is also used for shutdown,
+ * so we add links for that
+ * too to the shutdown
+ * target.*/
if ((r = manager_load_unit(m, SPECIAL_SHUTDOWN_TARGET, NULL, &shutdown_target)) < 0)
goto finish;
if ((r = manager_load_unit(m, SPECIAL_SHUTDOWN_TARGET, NULL, &shutdown_target)) < 0)
goto finish;