blob: c947bea869414690ad653a6ce58e1cb692d59d51 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#!/bin/sh
unsupported() {
echo "org.freedesktop.Hal.Device.SystemPowerManagement.NotSupported" >&2
echo "No shutdown command found" >&2
exit 1
}
#Try for common tools
if [ -x "/sbin/shutdown" ] ; then
/sbin/shutdown -p now
exit $?
elif [ -x "/usr/sbin/shutdown" ] ; then
/usr/sbin/shutdown -p now
exit $?
else
unsupported
fi
|