MOON
Server: Apache/2.2.31 (Unix) mod_ssl/2.2.31 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4
System: Linux csr818.wilogic.com 2.6.18-419.el5xen #1 SMP Fri Feb 24 22:50:37 UTC 2017 x86_64
User: digitals (531)
PHP: 5.4.45
Disabled: NONE
Upload Files
File: //usr/lib64/hal/scripts/linux/hal-system-power-set-power-save-linux
#!/bin/sh
read value

unsupported() {
	echo org.freedesktop.Hal.Device.SystemPowerManagement.NotSupported >&2
	echo No powersave method found >&2
	exit 1
}

#SuSE and ALTLinux only support powersave
if [ -f /etc/altlinux-release ] || [ -f /etc/SuSE-release ] ; then
	if [ -x "/usr/bin/powersave" ] ; then
		if [ $value = "true" ]; then
			/usr/bin/powersave -e Powersave
			RET=$?
		elif [ $value = "false" ]; then
			/usr/bin/powersave -e Performance
			RET=$?
		fi
	else
		unsupported
	fi

#RedHat/Fedora only support pm-utils
elif [ -f /etc/redhat-release ] || [ -f /etc/fedora-release ] ; then
	if [ -x "/usr/sbin/pm-powersave" ] ; then
		if [ $value = "true" ]; then
			/usr/sbin/pm-powersave true
			RET=$?
		elif [ $value = "false" ]; then
			/usr/sbin/pm-powersave false
			RET=$?
		fi
	else
		unsupported
	fi

else
	# cannot set proc stuff here, so error out
	unsupported
	fi 

exit $RET