aboutsummaryrefslogtreecommitdiffstats
path: root/sys-apps/sysvinit/files/sysvinit-2.99-force-poweroff.patch
diff options
context:
space:
mode:
authorPA4WDH2021-07-13 19:47:04 +0200
committerPA4WDH2021-07-13 19:47:04 +0200
commit5884c94b1f92c00406d137c9f308c098e5268a59 (patch)
tree8483f1da04bf5cbed41220bafcffa502cae95eaa /sys-apps/sysvinit/files/sysvinit-2.99-force-poweroff.patch
downloadunmatched-patchwork-5884c94b1f92c00406d137c9f308c098e5268a59.tar.gz
unmatched-patchwork-5884c94b1f92c00406d137c9f308c098e5268a59.tar.bz2
unmatched-patchwork-5884c94b1f92c00406d137c9f308c098e5268a59.zip
Initial commit
Diffstat (limited to 'sys-apps/sysvinit/files/sysvinit-2.99-force-poweroff.patch')
-rw-r--r--sys-apps/sysvinit/files/sysvinit-2.99-force-poweroff.patch16
1 files changed, 16 insertions, 0 deletions
diff --git a/sys-apps/sysvinit/files/sysvinit-2.99-force-poweroff.patch b/sys-apps/sysvinit/files/sysvinit-2.99-force-poweroff.patch
new file mode 100644
index 0000000..d9dc0ef
--- /dev/null
+++ b/sys-apps/sysvinit/files/sysvinit-2.99-force-poweroff.patch
@@ -0,0 +1,16 @@
+diff -Naur sysvinit-2.99/src/halt.c sysvinit-2.99-mod/src/halt.c
+--- sysvinit-2.99/src/halt.c 2021-02-21 19:02:25.000000000 +0100
++++ sysvinit-2.99-mod/src/halt.c 2021-06-26 17:00:41.577268981 +0200
+@@ -209,6 +209,12 @@
+ if (!strcmp(progname, "reboot")) do_reboot = 1;
+ if (!strcmp(progname, "poweroff")) do_poweroff = 1;
+
++ /* The unmatched doen't reboot, so force poweroff */
++ if (do_reboot) {
++ do_reboot = 0;
++ do_poweroff = 1;
++ }
++
+ /*
+ * Get flags
+ */