systemd/fix-support-for-boot-prefixed-initscript-bnc-746506.patch
Tomáš Chvátal c446b5bdf8 Accepting request 198848 from Base:System
- Enable Predictable Network interface names (bnc#829526).

- version 207, distribution specific changes follow, for overall 
  release notes see NEWS.
- Fixed: 
  * Failed at step PAM spawning /usr/lib/systemd/systemd: 
  Operation not permitted
  * Fix shutdown hang "a stop job is running for Session 1 of user root"
    that was reported in opensuse-factory list.
- systemd-sysctl no longer reads /etc/sysctl.conf however backward
  compatbility is to be provides by a symlink created at %post.
- removed previously disabled upstream patches (merged):
  0002-core-mount.c-mount_dump-don-t-segfault-if-mount-is-n.patch,
  0004-disable-the-cgroups-release-agent-when-shutting-down.patch,
  0005-cgroups-agent-remove-ancient-fallback-code-turn-conn.patch,
  0006-suppress-status-message-output-at-shutdown-when-quie.patch,
- removed upstream merged patches:
  exclude-dev-from-tmpfiles.patch,
  logind_update_state_file_after_generating_....patch
- Add systemd-pam_config.patch: use correct include name for PAM
  configuration on openSUSE.

- Add exclude-dev-from-tmpfiles.patch: allow to exclude /dev from
  tmpfiles (bnc#835813).

OBS-URL: https://build.opensuse.org/request/show/198848
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=155
2013-09-13 12:45:43 +00:00

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 | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
--- 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
p[strlen(p) - sizeof(".service") + 1] = 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) {
+ r = log_oom();
+ goto finish;
+ }
+ p[strlen(p) - sizeof(".service") + 1] = 0;
+ found_sysv = access(p, F_OK) >= 0;
+
+ if (!found_sysv) {
+ continue;
+ }
+#else
continue;
+#endif
+ }
/* Mark this entry, so that we don't try enabling it as native unit */
args[f] = (char*) "";