70c63e98f9
- mark more subpackages as !bootstrap for systemd-mini usage. - spec : remove --with-firmware-path, firmware loader was removed in v217 - spec: remove --disable-multi-seat-x, gone.(fixed in xorg) - spec: Do not enable systemd-readahead-collect.service and systemd-readahead-replay.service as these do not exist anymore. - spec: drop timedate-add-support-for-openSUSE-version-of-etc-sysconfig.patch Yast was fixed to write all timezone changes exactly how timedated expects things to be done. - spec: remove handle-etc-HOSTNAME.patch, since late 2014 the netcfg package handles the migration from /etc/HOSTNAME to /etc/hostname and owns both files. -spec: remove boot.udev and systemd-journald.init as they currently serve no purpose. - suse-sysv-bootd-support.diff: Remove HAVE_SYSVINIT conditions, we are in sysvcompat-only codepath, also remove the code targetting other distributions, never compiled as the TARGET_$DISTRO macros are never defined. - systemd-powerd-initctl-support.patch guard with HAVE_SYSV_COMPAT - set-and-use-default-logconsole.patch: fix HAVE_SYSV_COMPAT guards - insserv-generator.patch: Only build when sysvcompat is enabled - vhangup-on-all-consoles.patch add a comment indicating this is a workaround for a kernel bug. - spec: Add option to allow disabling sysvinit compat at build time. - spec: Add option to enable resolved at build time. - spec: Remove all %ifs for !factory products, current systemd releases can neither be built nor installed in older products without upgrading several components of the base system. (removed: 1008-add-msft-compability-rules.patch was only for =< 13.1) - spec: remove all dummy "aliases" to /etc/init.d, that made sense only when those init scripts still existed. (dummy localfs.service source: gone) OBS-URL: https://build.opensuse.org/request/show/286653 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=215
85 lines
3.0 KiB
Diff
85 lines
3.0 KiB
Diff
---
|
|
src/core/shutdown.c | 4 ++++
|
|
src/systemctl/systemctl.c | 18 ++++++++++++------
|
|
2 files changed, 16 insertions(+), 6 deletions(-)
|
|
|
|
Index: systemd-218/src/core/shutdown.c
|
|
===================================================================
|
|
--- systemd-218.orig/src/core/shutdown.c
|
|
+++ systemd-218/src/core/shutdown.c
|
|
@@ -400,6 +400,10 @@ int main(int argc, char *argv[]) {
|
|
}
|
|
|
|
reboot(cmd);
|
|
+
|
|
+ if (cmd == (int)RB_POWER_OFF)
|
|
+ reboot(RB_HALT_SYSTEM);
|
|
+
|
|
if (errno == EPERM && in_container) {
|
|
/* If we are in a container, and we lacked
|
|
* CAP_SYS_BOOT just exit, this will kill our
|
|
Index: systemd-218/src/systemctl/systemctl.c
|
|
===================================================================
|
|
--- systemd-218.orig/src/systemctl/systemctl.c
|
|
+++ systemd-218/src/systemctl/systemctl.c
|
|
@@ -94,6 +94,7 @@ static bool arg_no_pager = false;
|
|
static bool arg_no_wtmp = false;
|
|
static bool arg_no_wall = false;
|
|
static bool arg_no_reload = false;
|
|
+static bool arg_no_sync = false;
|
|
static bool arg_show_types = false;
|
|
static bool arg_ignore_inhibitors = false;
|
|
static bool arg_dry = false;
|
|
@@ -6813,6 +6814,7 @@ static int halt_parse_argv(int argc, cha
|
|
{ "reboot", no_argument, NULL, ARG_REBOOT },
|
|
{ "force", no_argument, NULL, 'f' },
|
|
{ "wtmp-only", no_argument, NULL, 'w' },
|
|
+ { "no-sync", no_argument, NULL, 'n' },
|
|
{ "no-wtmp", no_argument, NULL, 'd' },
|
|
{ "no-wall", no_argument, NULL, ARG_NO_WALL },
|
|
{}
|
|
@@ -6865,10 +6867,13 @@ static int halt_parse_argv(int argc, cha
|
|
|
|
case 'i':
|
|
case 'h':
|
|
- case 'n':
|
|
/* Compatibility nops */
|
|
break;
|
|
|
|
+ case 'n':
|
|
+ arg_no_sync = true;
|
|
+ break;
|
|
+
|
|
case '?':
|
|
return -EINVAL;
|
|
|
|
@@ -7511,7 +7516,8 @@ static int halt_now(enum action a) {
|
|
/* The kernel will automaticall flush ATA disks and suchlike
|
|
* on reboot(), but the file systems need to be synce'd
|
|
* explicitly in advance. */
|
|
- sync();
|
|
+ if (!arg_no_sync)
|
|
+ sync();
|
|
|
|
/* Make sure C-A-D is handled by the kernel from this point
|
|
* on... */
|
|
@@ -7519,14 +7525,14 @@ static int halt_now(enum action a) {
|
|
|
|
switch (a) {
|
|
|
|
- case ACTION_HALT:
|
|
- log_info("Halting.");
|
|
- reboot(RB_HALT_SYSTEM);
|
|
- return -errno;
|
|
|
|
case ACTION_POWEROFF:
|
|
log_info("Powering off.");
|
|
reboot(RB_POWER_OFF);
|
|
+ /* fall-through */
|
|
+ case ACTION_HALT:
|
|
+ log_info("Halting.");
|
|
+ reboot(RB_HALT_SYSTEM);
|
|
return -errno;
|
|
|
|
case ACTION_REBOOT: {
|