SHA256
1
0
forked from pool/systemd
systemd/fix-enable-disable-boot-initscript.patch
Cristian Rodríguez 8b76a698a3 Accepting request 131520 from home:fcrozat:branches:Base:System
- Add use_localtime.patch: use /etc/localtime instead of
  /etc/timezone (bnc#773491)
- Add support-suse-clock-sysconfig.patch: read SUSE
  /etc/sysconfig/clock file.
- Add drop-timezone.patch: drop support for /etc/timezone, never
  supported on openSUSE.
- Add journalctl-pager-improvement.patch: better handle output when
  using pager.
- Add fix-enable-disable-boot-initscript.patch: support boot.*
  initscripts for systemctl enable /disable (bnc#746506).

OBS-URL: https://build.opensuse.org/request/show/131520
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=298
2012-08-25 21:03:07 +00:00

45 lines
1.5 KiB
Diff

From f9d333f8d202fd853f2553ee6c3196b041ccfba5 Mon Sep 17 00:00:00 2001
From: Frederic Crozat <fcrozat@suse.com>
Date: Thu, 23 Aug 2012 11:08:25 +0200
Subject: [PATCH] fix support for boot prefixed initscript (bnc#746506)
---
src/systemctl.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/src/systemctl.c b/src/systemctl.c
index e94e024..1a98599 100644
--- a/src/systemctl.c
+++ b/src/systemctl.c
@@ -3669,7 +3669,27 @@ static int enable_sysv_units(char **args) {
if (!found_sysv) {
free(p);
+#if defined(TARGET_SUSE)
+ 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) {
+ log_error("No memory");
+ r = -ENOMEM;
+ goto finish;
+ }
+ p[strlen(p) - sizeof(".service") + 1] = 0;
+ found_sysv = access(p, F_OK) >= 0;
+
+ if (!found_sysv) {
+ free(p);
+ continue;
+ }
+#else
continue;
+#endif
}
/* Mark this entry, so that we don't try enabling it as native unit */
--
1.7.10.4