summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
bbe3505)
we need to disable this on boot, or else it will ask questions and
hang the boot process.
Also check for valid values to not write trash to cpu_mhz_max
DEPENDS = "zenity dbus"
RDEPENDS = "zenity dbus"
DEPENDS = "zenity dbus"
RDEPENDS = "zenity dbus"
SRC_URI = " \
file://op_paths.sh \
SRC_URI = " \
file://op_paths.sh \
device=/proc/pandora/cpu_mhz_max
curmhz="$(cat $device)"
newmhz="$(cat $device)"
device=/proc/pandora/cpu_mhz_max
curmhz="$(cat $device)"
newmhz="$(cat $device)"
-kernel_major=`uname -r | cut -c 1`
+
+if [ "$1" = "-n" ]; then
+ shift
+ warn=no
+fi
if [ ! -e $device ]; then
if [ -z "$1" -a -n "$DISPLAY" ]; then
if [ ! -e $device ]; then
if [ -z "$1" -a -n "$DISPLAY" ]; then
if [ $DISPLAY ]; then
newmhz=$(zenity --scale --text "Set CPU clockspeed" --min-value=$minmhz --max-value=$maxmhz --value=$curmhz --step 1)
else
if [ $DISPLAY ]; then
newmhz=$(zenity --scale --text "Set CPU clockspeed" --min-value=$minmhz --max-value=$maxmhz --value=$curmhz --step 1)
else
- newmhz=$(read -p "Please enter the desired clockspeed")
+ read -p "Please enter the desired clockspeed: " newmhz
+if ! [ 0 -lt "$newmhz" -a "$newmhz" -lt 10000 ]; then
+ echo "invalid argument: $newmhz"
+ exit 1
+fi
+
if [ $newmhz ]; then
if [ $newmhz -gt $safemhz ]; then
if [ $warn != no ]; then
if [ $newmhz ]; then
if [ $newmhz -gt $safemhz ]; then
if [ $warn != no ]; then