2012-08-26 11:35:18 +02:00
|
|
|
From: Frederic Crozat <fcrozat@suse.com>
|
|
|
|
Date: Thu, 23 Aug 2012 11:08:25 +0200
|
2013-04-23 11:39:56 +02:00
|
|
|
Subject: fix support for boot prefixed initscript (bnc#746506)
|
2012-08-26 11:35:18 +02:00
|
|
|
|
|
|
|
---
|
2013-04-23 11:39:56 +02:00
|
|
|
src/systemctl/systemctl.c | 22 +++++++++++++++++++++-
|
|
|
|
1 file changed, 21 insertions(+), 1 deletion(-)
|
2012-08-26 11:35:18 +02:00
|
|
|
|
2013-09-13 14:45:43 +02:00
|
|
|
--- systemd-206_git201308300826.orig/src/systemctl/systemctl.c
|
|
|
|
+++ systemd-206_git201308300826/src/systemctl/systemctl.c
|
|
|
|
@@ -4169,8 +4169,28 @@ static int enable_sysv_units(char **args
|
2013-04-23 11:39:56 +02:00
|
|
|
p[strlen(p) - sizeof(".service") + 1] = 0;
|
|
|
|
found_sysv = access(p, F_OK) >= 0;
|
2012-08-26 11:35:18 +02:00
|
|
|
|
2013-04-23 11:39:56 +02:00
|
|
|
- if (!found_sysv)
|
|
|
|
+ if (!found_sysv) {
|
|
|
|
+#ifdef HAVE_SYSV_COMPAT
|
|
|
|
+ free(p);
|
2012-08-26 11:35:18 +02:00
|
|
|
+ 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) {
|
2013-04-23 11:39:56 +02:00
|
|
|
+ r = log_oom();
|
2012-08-26 11:35:18 +02:00
|
|
|
+ goto finish;
|
|
|
|
+ }
|
|
|
|
+ p[strlen(p) - sizeof(".service") + 1] = 0;
|
|
|
|
+ found_sysv = access(p, F_OK) >= 0;
|
|
|
|
+
|
|
|
|
+ if (!found_sysv) {
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+#else
|
|
|
|
continue;
|
|
|
|
+#endif
|
2013-04-23 11:39:56 +02:00
|
|
|
+ }
|
2012-08-26 11:35:18 +02:00
|
|
|
|
|
|
|
/* Mark this entry, so that we don't try enabling it as native unit */
|
2013-04-23 11:39:56 +02:00
|
|
|
args[f] = (char*) "";
|