--- tools/bsdsunix/hal-system-power-set-power-save-bsdsunix.orig 2016-12-05 16:21:28 UTC +++ tools/bsdsunix/hal-system-power-set-power-save-bsdsunix @@ -0,0 +1,24 @@ +#!/bin/sh + +value=$1 + +unsupported() { + echo org.freedesktop.Hal.Device.SystemPowerManagement.NotSupported >&2 + echo No powersave method found >&2 + exit 1 +} + +if [ -x "/etc/rc.d/power_profile" ] ; then + if [ $value = "true" ]; then + /etc/rc.d/power_profile 0x00 + RET=$? + elif [ $value = "false" ]; then + /etc/rc.d/power_profile 0x01 + RET=$? + fi +else + unsupported +fi + +exit $RET +