systemd/1018-Make-LSB-Skripts-know-about-Required-and-Should.patch
Stephan Kulow 8f6010ffdf Accepting request 215598 from Base:System
- Change patch 0001-add-hdflush-for-reboot-or-hddown-for-poweroff.patch
  to skip already by the kernel managed devices 

- fix timeout stopping user@.service (bnc#841544)
  * 0001-core-introduce-new-KillMode-mixed-which-sends-SIGTER.patch
  * 0002-service-allow-KillMode-mixed-in-conjunction-with-PAM.patch
  * 0003-core-make-sure-to-always-go-through-both-SIGTERM-and.patch

- Add patch 0001-upstream-systemctl-halt-reboot-error-handling.patch
  to be able to detect if the sysctl reboot() returns.
- Add patch 0001-add-hdflush-for-reboot-or-hddown-for-poweroff.patch
  A check for unmaintained disk like devices is added to be able to
  flush and maybe shut them down.  Also the missing sync() system
  call is added for the direct halt/reboot systemctl command. Then
  the system halt is used as fallback if poweroff fails for both
  the direct poweroff systemctl command as well as for the
  systemd-shutdown utility.

- Make systemd-mini build 

- Make requires bash-completion a recommends

- Add patch 1017-skip-native-unit-handling-if-sysv-already-handled.patch
  to avoid that enabled boot scripts will be handled as unit files
  by systemctl status command (bnc#818044)

- Drop patch 1017-enforce-sufficient-shutdown-warnings.patch
  as the original code behaves exactly as the shutdown code of
  the old SysVinit (bnc#750845)
- Rename support-powerfail-with-powerstatus.patch to

OBS-URL: https://build.opensuse.org/request/show/215598
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=173
2014-01-31 12:36:06 +00:00

52 lines
2.5 KiB
Diff

--- systemd-208/src/core/service.c
+++ systemd-208/src/core/service.c 2014-01-17 12:15:52.527311588 +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_WANTS;
FOREACH_WORD_QUOTED(w, z, strchr(t, ':')+1, i) {
char *n, *m;
@@ -838,12 +843,15 @@ 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);
+ r = unit_add_two_dependencies_by_name(u, d, e, m, NULL, true);
if (r < 0)
log_error_unit(u->id, "[%s:%u] Failed to add dependency on %s, ignoring: %s",