summaryrefslogtreecommitdiff
path: root/user/consolekit2/poweroff.patch
blob: 8ae9d21a5e4da1a46d05ebe24b8926f07ae57d73 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Most users expect "shutdown" to also power off the machine when
requested from a graphical environment. "Actions after halting are
unspecified" when using -h (LSB 3.0) - sysvinit additionally tries to
power off when using -h, whereas s6-linux-init only halts.
Use the **non-standard** -P option (implemented by sysvinit and
s6-linux-init since 1.0.2.0) to request power off after halting.

--- ConsoleKit2-1.2.1/tools/linux/ck-system-stop	2017-06-02 01:31:44.000000000 +0000
+++ ConsoleKit2-1.2.1/tools/linux/ck-system-stop	2019-06-09 17:40:31.110006347 +0000
@@ -2,10 +2,10 @@
 
 #Try for common tools
 if [ -x "/sbin/shutdown" ] ; then
-	/sbin/shutdown -h now
+	/sbin/shutdown -hP now
 	exit $?
 elif [ -x "/usr/sbin/shutdown" ] ; then
-	/usr/sbin/shutdown -h now
+	/usr/sbin/shutdown -hP now
 	exit $?
 else
 	exit 1