systemd/0018-Make-LSB-Skripts-know-about-Required-and-Should.patch
Stephan Kulow 55d1226d79 Accepting request 229621 from Base:System
- Add two patches from hare@suse.com
  1011-64-btrfs.rules-skip-btrfs-check-if-devices-are-not-r.patch
  1012-Skip-persistent-device-link-creation-on-multipath-de.patch
  to solve bnc#872929

- Increase result size for programs stdout (bnc#867840).
  add: 1010-udev-increase-result-size-for-programs.patch
- Update udev-generate-peristent-rule.sh to the latest version.
- Clean-up spec file, re-arange patch to suit the setup, all udev
  patches start with 1XXX-*.{patch,diff}.
- Rename: 0013-cdrom_id-use-the-old-MMC-fallback.patch to
  1009-cdrom_id-use-the-old-MMC-fallback.patch
- Rename: 1009-make-xsltproc-use-correct-ROFF-links.patch to
  0009-make-xsltproc-use-correct-ROFF-links.patch
- Rename: 1010-do-not-install-sulogin-unit-with-poweroff.patch to
  0010-do-not-install-sulogin-unit-with-poweroff.patch
- Rename: 1014-journald-with-journaling-FS.patch to
  0014-journald-with-journaling-FS.patch
- Rename: 1018-Make-LSB-Skripts-know-about-Required-and-Should.patch to
  0018-Make-LSB-Skripts-know-about-Required-and-Should.patch
- Rename: 1019-make-completion-smart-to-be-able-to-redirect.patch to
  0019-make-completion-smart-to-be-able-to-redirect.patch
- Rename: 1022-systemd-tmpfiles-ownerkeep.patch to
  0022-systemd-tmpfiles-ownerkeep.patch 

- Add two patches from hare@suse.com
  1011-64-btrfs.rules-skip-btrfs-check-if-devices-are-not-r.patch
  1012-Skip-persistent-device-link-creation-on-multipath-de.patch
  to solve bnc#872929

OBS-URL: https://build.opensuse.org/request/show/229621
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=181
2014-04-12 19:28:52 +00:00

69 lines
3.2 KiB
Diff

Should solve the problems of
bug #858864 - LSB "+" dependencies aren't handled properly
bug #857204 - inssrv fails to enable rpcbind
The side effect is that RequiresOverridable= is used for the services
add behind Required-Start
bug #863217 - systemd overrides explicit admin request to disable a service
That is that in this version the Wants= for all services behind
Should-Start, X-Start-Before, and X-Stop-After is not used anymore
---
service.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
--- systemd-208/src/core/service.c
+++ systemd-208/src/core/service.c 2014-02-21 14:44:59.066735478 +0000
@@ -380,6 +380,8 @@ static int sysv_translate_facility(const
"remote_fs", SPECIAL_REMOTE_FS_TARGET,
"syslog", NULL,
"time", SPECIAL_TIME_SYNC_TARGET,
+ "all", SPECIAL_DEFAULT_TARGET,
+ "null", NULL,
};
unsigned i;
@@ -389,7 +391,7 @@ static int sysv_translate_facility(const
assert(name);
assert(_r);
- n = *name == '$' ? name + 1 : name;
+ n = (*name == '$' || *name == '+') ? name + 1 : name;
for (i = 0; i < ELEMENTSOF(table); i += 2) {
@@ -816,10 +818,13 @@ static int service_load_sysv_path(Servic
startswith_no_case(t, "Should-Start:") ||
startswith_no_case(t, "X-Start-Before:") ||
startswith_no_case(t, "X-Start-After:")) {
+ UnitDependency d, e;
char *i, *w;
size_t z;
state = LSB;
+ d = startswith_no_case(t, "X-Start-Before:") ? UNIT_BEFORE : UNIT_AFTER;
+ e = startswith_no_case(t, "Required-Start:") ? UNIT_REQUIRES_OVERRIDABLE : _UNIT_DEPENDENCY_INVALID;
FOREACH_WORD_QUOTED(w, z, strchr(t, ':')+1, i) {
char *n, *m;
@@ -838,12 +843,18 @@ static int service_load_sysv_path(Servic
continue;
}
+ if (*n == '+')
+ e = UNIT_WANTS;
+
free(n);
if (r == 0)
continue;
- r = unit_add_dependency_by_name(u, startswith_no_case(t, "X-Start-Before:") ? UNIT_BEFORE : UNIT_AFTER, m, NULL, true);
+ if (e != _UNIT_DEPENDENCY_INVALID)
+ r = unit_add_two_dependencies_by_name(u, d, e, m, NULL, true);
+ else
+ r = unit_add_dependency_by_name(u, d, m, NULL, true);
if (r < 0)
log_error_unit(u->id, "[%s:%u] Failed to add dependency on %s, ignoring: %s",