Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 644548
Collapse All | Expand All

(-)a/ck-system-restart (-1 / +4 lines)
Lines 1-7 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
2
3
if [ $(cat /proc/1/comm) = "openrc-init" ] ; then
4
	/sbin/openrc-shutdown -r
5
	exit $?
3
#Try for common tools
6
#Try for common tools
4
if [ -x "/sbin/shutdown" ] ; then
7
elif [ -x "/sbin/shutdown" ] ; then
5
	/sbin/shutdown -r now
8
	/sbin/shutdown -r now
6
	exit $?
9
	exit $?
7
elif [ -x "/usr/sbin/shutdown" ] ; then
10
elif [ -x "/usr/sbin/shutdown" ] ; then
(-)a/ck-system-stop (-1 / +4 lines)
Lines 1-7 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
2
3
if [ $(cat /proc/1/comm) = "openrc-init" ] ; then
4
  	/sbin/openrc-shutdown -p
5
	exit $?
3
#Try for common tools
6
#Try for common tools
4
if [ -x "/sbin/shutdown" ] ; then
7
elif [ -x "/sbin/shutdown" ] ; then
5
	/sbin/shutdown -h now
8
	/sbin/shutdown -h now
6
	exit $?
9
	exit $?
7
elif [ -x "/usr/sbin/shutdown" ] ; then
10
elif [ -x "/usr/sbin/shutdown" ] ; then

Return to bug 644548