forked from pool/systemd
a4023d0c37
- Fix patch tty-ask-password-agent-on-console.patch not to crash away but enable it to ask on all devices of /dev/console - Avoid "file not found /etc/udev/rules.d/70-persistent-net.rules" waring occurring in %post - Add patch let-vconsole-setup-get-properties-only-once-to-copy-them.patch to avoid broken virtual console mapping due stressed ioctl API for the virtual consoles (boo#904214) - Fix last change that is use the new name for udev packages in %pretrans. - restore usage of LUA in %pretrans. - Try to generate the systemd users and groups always in same order to avoid republish other packages (boo#944660) - cleanup specfile by removing commands that were dealing with systemd pre-generated files: we're now using systemd tarball generated directly from the git repo which doesn't contain any of these files. - there's no point in using LUA in %pretrans - Drop 0009-make-xsltproc-use-correct-ROFF-links.patch This patch was initialy added to workaround bsc#842844. But it appears that man(1) was fixed (included since 13.2 at least) to handle manual pages that consist only of a .so directive such as '.so <page>'. - Change use-rndaddentropy-ioctl-to-load-random-seed.patch to make it work on big endian OBS-URL: https://build.opensuse.org/request/show/333777 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=223
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-221/src/core/shutdown.c
|
|
===================================================================
|
|
--- systemd-221.orig/src/core/shutdown.c
|
|
+++ systemd-221/src/core/shutdown.c
|
|
@@ -396,6 +396,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-221/src/systemctl/systemctl.c
|
|
===================================================================
|
|
--- systemd-221.orig/src/systemctl/systemctl.c
|
|
+++ systemd-221/src/systemctl/systemctl.c
|
|
@@ -93,6 +93,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;
|
|
@@ -6636,6 +6637,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 },
|
|
{}
|
|
@@ -6688,10 +6690,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;
|
|
|
|
@@ -7291,7 +7296,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... */
|
|
@@ -7299,14 +7305,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: {
|