forked from pool/systemd
b9d779e5bf
Submit systemd to a staging of it's own - retest post revert OBS-URL: https://build.opensuse.org/request/show/290056 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=218
41 lines
1.5 KiB
Diff
41 lines
1.5 KiB
Diff
From: Frederic Crozat <fcrozat@suse.com>
|
|
Date: Thu, 23 Aug 2012 11:08:25 +0200
|
|
Subject: fix support for boot prefixed initscript (bnc#746506)
|
|
|
|
---
|
|
src/systemctl/systemctl.c | 20 +++++++++++++++++++-
|
|
1 file changed, 19 insertions(+), 1 deletion(-)
|
|
|
|
Index: systemd-218/src/systemctl/systemctl.c
|
|
===================================================================
|
|
--- systemd-218.orig/src/systemctl/systemctl.c
|
|
+++ systemd-218/src/systemctl/systemctl.c
|
|
@@ -5202,8 +5202,26 @@ static int enable_sysv_units(const char
|
|
|
|
p[strlen(p) - strlen(".service")] = 0;
|
|
found_sysv = access(p, F_OK) >= 0;
|
|
- if (!found_sysv)
|
|
+ if (!found_sysv) {
|
|
+#ifdef HAVE_SYSV_COMPAT
|
|
+ free(p);
|
|
+ p = NULL;
|
|
+ if (!isempty(arg_root))
|
|
+ asprintf(&p, "%s/" SYSTEM_SYSVINIT_PATH "/boot.%s", arg_root, name);
|
|
+ else
|
|
+ asprintf(&p, SYSTEM_SYSVINIT_PATH "/boot.%s", name);
|
|
+ if (!p)
|
|
+ return -ENOMEM;
|
|
+ p[strlen(p) - sizeof(".service") + 1] = 0;
|
|
+ found_sysv = access(p, F_OK) >= 0;
|
|
+
|
|
+ if (!found_sysv) {
|
|
+ continue;
|
|
+ }
|
|
+#else
|
|
continue;
|
|
+#endif
|
|
+ }
|
|
|
|
log_info("%s is not a native service, redirecting to /sbin/chkconfig.", name);
|
|
|