[systemd-commits] 2 commits - src/core src/libsystemd
Lennart Poettering
lennart at kemper.freedesktop.org
Mon Mar 24 11:57:52 PDT 2014
src/core/service.c | 25 +++++++++----------------
src/libsystemd/sd-login/Makefile | 1 +
2 files changed, 10 insertions(+), 16 deletions(-)
New commits:
commit 1cfc57e8847ab2b138e5a8fcff4f881b3b1a9b60
Author: Lennart Poettering <lennart at poettering.net>
Date: Mon Mar 24 19:57:10 2014 +0100
build-sys: add makefile link
diff --git a/src/libsystemd/sd-login/Makefile b/src/libsystemd/sd-login/Makefile
new file mode 120000
index 0000000..d0b0e8e
--- /dev/null
+++ b/src/libsystemd/sd-login/Makefile
@@ -0,0 +1 @@
+../Makefile
\ No newline at end of file
commit 1c07b16c2f98e03d44f1dff5343110c60934ff07
Author: Lennart Poettering <lennart at poettering.net>
Date: Mon Mar 24 19:55:47 2014 +0100
service: don't take chkconfig priority into account
Given that native services do not carry a sysv priority anyway it is
pointless reading them from chkconfig headers, and pretend they'd work.
So let's drop this.
diff --git a/src/core/service.c b/src/core/service.c
index 67467b2..ae3695a 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -664,13 +664,8 @@ static int service_load_sysv_path(Service *s, const char *path) {
state = NORMAL;
- if (sscanf(t+10, "%15s %i %*i",
- runlevels,
- &start_priority) != 2) {
-
- log_warning_unit(u->id,
- "[%s:%u] Failed to parse chkconfig line. Ignoring.",
- path, line);
+ if (sscanf(t+10, "%15s %i %*i", runlevels, &start_priority) != 2) {
+ log_warning_unit(u->id, "[%s:%u] Failed to parse chkconfig line. Ignoring.", path, line);
continue;
}
@@ -678,19 +673,17 @@ static int service_load_sysv_path(Service *s, const char *path) {
* symlink farms is preferred over the
* data from the LSB header. */
if (start_priority < 0 || start_priority > 99)
- log_warning_unit(u->id,
- "[%s:%u] Start priority out of range. Ignoring.",
- path, line);
+ log_warning_unit(u->id, "[%s:%u] Start priority out of range. Ignoring.", path, line);
else
- s->sysv_start_priority = start_priority;
+ log_debug_unit(u->id, "[%s:%u] Ignoring start priority set in the chkconfig file.", path, line);
char_array_0(runlevels);
k = delete_chars(runlevels, WHITESPACE "-");
-
if (k[0]) {
char *d;
- if (!(d = strdup(k))) {
+ d = strdup(k);
+ if (!d) {
r = -ENOMEM;
goto finish;
}
@@ -992,9 +985,9 @@ static int service_load_sysv_path(Service *s, const char *path) {
u->description = d;
}
- /* The priority that has been set in /etc/rcN.d/ hierarchies
- * takes precedence over what is stored as default in the LSB
- * header */
+ /* Initialize the start priority from what has been set in the
+ * /etc/rcN.d/ hierarchies if we load the unit file as SysV
+ * init script. */
if (s->sysv_start_priority_from_rcnd >= 0)
s->sysv_start_priority = s->sysv_start_priority_from_rcnd;
More information about the systemd-commits
mailing list