bin sh if -eq then for in do cpufreq-set -c -g powersave done echo sys

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
#!/bin/sh
if [[ $1 -eq 0 ]]; then
for i in 0 1; do
cpufreq-set -c $i -g powersave
done
echo 0 > /sys/class/backlight/acpi_video0/brightness
/etc/rc.d/openntpd stop
else
for i in 0 1; do
cpufreq-set -c $i -g performance
done
cat /sys/class/backlight/acpi_video0/max_brightness > /sys/class/backlight/acpi_video0/brightness
/etc/rc.d/openntpd start
fi