blob: 7d1a62d1da5fee058c181e0fe5d6475b462ae78c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/bin/sh
# $NetBSD: hal-system-power-reboot-netbsd,v 1.1 2008/11/27 03:32:19 jmcneill Exp $
unsupported() {
echo "org.freedesktop.Hal.Device.SystemPowerManagement.NotSupported" >&2
echo "No reboot command found" >&2
exit 1
}
#Try for common tools
if [ -x "/sbin/shutdown" ] ; then
/sbin/shutdown -r now
exit $?
elif [ -x "/usr/sbin/shutdown" ] ; then
/usr/sbin/shutdown -r now
exit $?
else
unsupported
fi
|