Apache/2.4.7 (Ubuntu) Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) safemode : OFF MySQL: ON | Perl: ON | cURL: OFF | WGet: ON > / etc / init.d / | server ip : 104.21.89.46 your ip : 172.69.130.155 H O M E |
Filename | /etc/init.d/ondemand |
Size | 1.26 kb |
Permission | rwxr-xr-x |
Owner | root : root |
Create time | 27-Apr-2025 09:50 |
Last modified | 13-Mar-2014 09:33 |
Last accessed | 05-Jul-2025 11:25 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
#! /bin/sh
### BEGIN INIT INFO
# Provides: ondemand
# Required-Start: $remote_fs $all
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: Set the CPU Frequency Scaling governor to "ondemand"
### END INIT INFO
# Don't run if we're going to start an Android LXC container:
[ ! -f /etc/init/lxc-android-config.conf ] || exit 0
PATH=/sbin:/usr/sbin:/bin:/usr/bin
. /lib/init/vars.sh
. /lib/lsb/init-functions
AVAILABLE="/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors"
case "$1" in
start)
start-stop-daemon --start --background --exec /etc/init.d/ondemand -- background
;;
background)
sleep 60 # probably enough time for desktop login
[ -f $AVAILABLE ] || exit 0
read governors < $AVAILABLE
case $governors in
*interactive*)
GOVERNOR="interactive"
break
;;
*ondemand*)
GOVERNOR="ondemand"
break
;;
*)
exit 0
;;
esac
for CPUFREQ in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
do
[ -f $CPUFREQ ] || continue
echo -n $GOVERNOR > $CPUFREQ
done
;;
restart|reload|force-reload)
echo "Error: argument '$1' not supported" >&2
exit 3
;;
stop)
;;
*)
echo "Usage: $0 start|stop" >&2
exit 3
;;
esac
### BEGIN INIT INFO
# Provides: ondemand
# Required-Start: $remote_fs $all
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: Set the CPU Frequency Scaling governor to "ondemand"
### END INIT INFO
# Don't run if we're going to start an Android LXC container:
[ ! -f /etc/init/lxc-android-config.conf ] || exit 0
PATH=/sbin:/usr/sbin:/bin:/usr/bin
. /lib/init/vars.sh
. /lib/lsb/init-functions
AVAILABLE="/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors"
case "$1" in
start)
start-stop-daemon --start --background --exec /etc/init.d/ondemand -- background
;;
background)
sleep 60 # probably enough time for desktop login
[ -f $AVAILABLE ] || exit 0
read governors < $AVAILABLE
case $governors in
*interactive*)
GOVERNOR="interactive"
break
;;
*ondemand*)
GOVERNOR="ondemand"
break
;;
*)
exit 0
;;
esac
for CPUFREQ in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
do
[ -f $CPUFREQ ] || continue
echo -n $GOVERNOR > $CPUFREQ
done
;;
restart|reload|force-reload)
echo "Error: argument '$1' not supported" >&2
exit 3
;;
stop)
;;
*)
echo "Usage: $0 start|stop" >&2
exit 3
;;
esac