diff options
author | jmcneill <jmcneill@pkgsrc.org> | 2008-11-27 03:32:19 +0000 |
---|---|---|
committer | jmcneill <jmcneill@pkgsrc.org> | 2008-11-27 03:32:19 +0000 |
commit | eae81391a0129894a2defb744efde941faca12c4 (patch) | |
tree | bd04573b2d628005472823fb4eeea46225f4a592 /sysutils/hal/files/tools-netbsd/hal-system-power-shutdown-netbsd | |
parent | 991a8abd742c652b8d70f8af9d24470ddd5881f0 (diff) | |
download | pkgsrc-eae81391a0129894a2defb744efde941faca12c4.tar.gz |
Add reboot, shutdown, suspend support. Bump PKGREVISION.
Diffstat (limited to 'sysutils/hal/files/tools-netbsd/hal-system-power-shutdown-netbsd')
-rwxr-xr-x | sysutils/hal/files/tools-netbsd/hal-system-power-shutdown-netbsd | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sysutils/hal/files/tools-netbsd/hal-system-power-shutdown-netbsd b/sysutils/hal/files/tools-netbsd/hal-system-power-shutdown-netbsd new file mode 100755 index 00000000000..d05d8bca9b2 --- /dev/null +++ b/sysutils/hal/files/tools-netbsd/hal-system-power-shutdown-netbsd @@ -0,0 +1,19 @@ +#!/bin/sh +# $NetBSD: hal-system-power-shutdown-netbsd,v 1.1 2008/11/27 03:32:19 jmcneill Exp $ + +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 |