pandora-scripts: Fixed minor spelling and typo errors
authorMichael Mrozek <EvilDragon@openpandora.de>
Sat, 5 Jun 2010 09:18:15 +0000 (11:18 +0200)
committerMichael Mrozek <EvilDragon@openpandora.de>
Sat, 5 Jun 2010 09:18:15 +0000 (11:18 +0200)
recipes/pandora-system/pandora-first-run-wizard/first-run-wizard.sh
recipes/pandora-system/pandora-scripts.bb
recipes/pandora-system/pandora-scripts/op_bright.sh
recipes/pandora-system/pandora-scripts/op_calibrate.sh
recipes/pandora-system/pandora-scripts/op_cpuspeed.sh
recipes/pandora-system/pandora-scripts/op_datetime.sh
recipes/pandora-system/pandora-scripts/op_lcdsettings.sh
recipes/pandora-system/pandora-scripts/op_nubmode.sh
recipes/pandora-system/pandora-scripts/op_startupmanager.sh

index 68e96e2..68ac72d 100755 (executable)
@@ -24,8 +24,7 @@ RESET_ROOT="yes"
 
 # Greet the user.
 
-if zenity --question --title="Pandoras Box has been opened." --text="Welcome!\n\nPandora's Box has been opened.\n\nThis wizard will help you setting up your new OpenPandora handheld before the first use.\n\nYou will be asked a few simple questions to personalise and configure your device for use.\n\nDo you want to setup your unit now or shutdown the unit and do it later?" --ok-label="Start now" --cancel-label="Shutdown" ; then
-
+if zenity --question --title="Pandoras Box has been opened." --text="Welcome!\n\nPandora's Box has been opened.\n\nThis wizard will help you setting up your new OpenPandora handheld before the first use.\n\nYou will be asked a few simple questions to personalise and configure your device.\n\nDo you want to set up your unit now or shut the unit down and do it later?" --ok-label="Start now" --cancel-label="Shutdown" ; then
 # ----
 
 # Reset ROOT's password to something random 
index 56c398b..f6c6bc9 100644 (file)
@@ -6,7 +6,7 @@ COMPATIBLE_MACHINE = "omap3-pandora"
 DEPENDS = "zenity dbus"
 RDEPENDS = "zenity dbus"
 
-PR = "r23"
+PR = "r24"
 
 SRC_URI = " \
           file://op_bright.sh \
index 57104a2..dcf223a 100755 (executable)
@@ -1,11 +1,11 @@
 #!/bin/bash
 #get value range
 minbright=3
-maxbright=$(cat /sys/devices/platform/twl4030-pwm0-bl/backlight/twl4030-pwm0-bl/max_brightness)
-curbright=$(cat /sys/devices/platform/twl4030-pwm0-bl/backlight/twl4030-pwm0-bl/brightness)
+maxbright="$(cat /sys/devices/platform/twl4030-pwm0-bl/backlight/twl4030-pwm0-bl/max_brightness)"
+curbright="$(cat /sys/devices/platform/twl4030-pwm0-bl/backlight/twl4030-pwm0-bl/brightness)"
 device=/sys/devices/platform/twl4030-pwm0-bl/backlight/twl4030-pwm0-bl/brightness
 if [ ! $1 ]; then
-newbright=$(zenity --scale --text "set brightness" --min-value=$minbright --max-value=$maxbright --value=$curbright --step 1)
+newbright=$(zenity --scale --text "Set brightness" --min-value=$minbright --max-value=$maxbright --value=$curbright --step 1)
 else
 newbright=$1
 fi
index 1556e7f..99a3ff2 100755 (executable)
@@ -1,3 +1,3 @@
 #!/bin/bash
 TSLIB_CONSOLEDEVICE=none op_runfbapp ts_calibrate
-zenity --info --title="Calibration" --text "The touchscreen has been calibrated. To activate the new values, you have to restart."
\ No newline at end of file
+zenity --info --title="Calibration" --text "The touchscreen has been calibrated. To activate the new settings, you have to reboot your unit."
\ No newline at end of file
index 7860562..e184b88 100644 (file)
@@ -3,14 +3,14 @@
 minmhz=14
 safemhz=600
 maxmhz=900
-newmhz=$(cat /proc/pandora/cpu_mhz_max)
-curmhz=$(cat /proc/pandora/cpu_mhz_max)
+curmhz="$(cat /proc/pandora/cpu_mhz_max)"
+newmhz="$(cat /proc/pandora/cpu_mhz_max)"
 device=/proc/pandora/cpu_mhz_max
 if [ ! $1 ]; then
        if [ $DISPLAY ]; then
-               newmhz=$(zenity --scale --text "set cpu mhz" --min-value=$minmhz --max-value=$maxmhz --value=$curmhz --step 1)
+               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 speed")
+               newmhz=$(read -p "Please enter the desired clockspeed")
        fi
 else
 newmhz=$1
@@ -18,11 +18,11 @@ fi
 if [ $newmhz ]; then
         if [ $newmhz -ge $safemhz ]; then
                 if [ $DISPLAY ]; then
-                        answer=$(zenity --question --title "Alert" --text "You are trying to set the cpu clock to $newmhz which is above its specification of $safemhz, doing so may burn down your house, sour milk, or just blow up (ok, not that likely)! proceed?";echo $?)
+                        answer=$(zenity --question --title "Alert" --text "You are trying to set the CPU clock to $newmhz which is above its specification of $safemhz, doing so may burn down your house, sour milk, or just blow up (OK, not that likely)! Proceed?";echo $?)
                         echo $answer
                         if [ $answer = 1 ]; then exit 1; fi
                 else
-                       answer="n";read -p "You are trying to set the cpu clock to $newmhz which is above its specification of $safemhz, doing so may burn down your house, sour milk, or just blow up (ok, not that likely)! proceed? [y/n]" -t 10 answer
+                       answer="n";read -p "You are trying to set the CPU clock to $newmhz which is above its specification of $safemhz, doing so may burn down your house, sour milk, or just blow up (OK, not that likely)! Proceed? [y/n]" -t 10 answer
                        echo $answer
                        if [ $answer = n ]; then exit 1; fi
                 fi
index 7321921..fd178be 100755 (executable)
@@ -2,8 +2,8 @@
 
 # Set the timezone and date/time
 
-while ! timezone=$(zenity --list --title "Select your timezone" --text="Please select your timezone" --column="Select your timezone" --print-column=1 "GMT (London, Lisbon, Portugal, Casablanca, Morocco)" "GMT+1 (Paris, Berlin, Amsterdam, Bern, Stockholm)" "GMT+2 (Athens, Helsinki, Istanbul)" "GMT+3 (Kuwait, Nairobi, Riyadh, Moscow)" "GMT+4 (Abu Dhabi, Iraq, Muscat, Kabul)" "GMT+5 (Calcutta, Colombo, Islamabad, Madras, New Delhi)" "GMT+6 (Almaty, Dhakar, Kathmandu)" "GMT+7 (Bangkok, Hanoi, Jakarta)" "GMT+8 (Beijing, Hong Kong, Kuala Lumpar, Singapore, Taipei)" "GMT+9 (Osaka, Seoul, Sapporo, Tokyo, Yakutsk)" "GMT+10 (Brisbane, Melbourne, Sydney, Vladivostok)" "GMT+11 (Magadan, New Caledonia, Solomon Is)" "GMT+12 (Auckland, Fiji, Kamchatka, Marshall Is., Wellington, Suva)" "GMT-1 (Azores, Cape Verde Is.)" "GMT-2 (Mid-Atlantic)" "GMT-3 (Brasilia, Buenos Aires, Georgetown)" "GMT-4 (Atlantic Time, Caracas)" "GMT-5 (Bogota, Lima, New York)" "GMT-6 (Mexico City, Saskatchewan, Chicago, Guatamala)" "GMT-7 (Denver, Edmonton, Mountain Time, Phoenix, Salt Lake City)" "GMT-8 (Anchorage, Los Angeles, San Francisco, Seattle)" "GMT-9 (Alaska)" "GMT-10 (Hawaii, Honolulu)" "GMT-11 (Midway Island, Samoa)" "GMT-12 (Eniwetok, Kwaialein)" "UTC" "Universal" --width=500 --height=450) || [ "x$timezone" = "x" ] ; do
-       zenity --title="Error" --error --text="Please select a timezone." --timeout=6
+while ! timezone=$(zenity --list --title "Select your time zone" --text="Please select your time zone" --column="Select your time zone" --print-column=1 "GMT (London, Lisbon, Portugal, Casablanca, Morocco)" "GMT+1 (Paris, Berlin, Amsterdam, Bern, Stockholm)" "GMT+2 (Athens, Helsinki, Istanbul)" "GMT+3 (Kuwait, Nairobi, Riyadh, Moscow)" "GMT+4 (Abu Dhabi, Iraq, Muscat, Kabul)" "GMT+5 (Calcutta, Colombo, Islamabad, Madras, New Delhi)" "GMT+6 (Almaty, Dhakar, Kathmandu)" "GMT+7 (Bangkok, Hanoi, Jakarta)" "GMT+8 (Beijing, Hong Kong, Kuala Lumpar, Singapore, Taipei)" "GMT+9 (Osaka, Seoul, Sapporo, Tokyo, Yakutsk)" "GMT+10 (Brisbane, Melbourne, Sydney, Vladivostok)" "GMT+11 (Magadan, New Caledonia, Solomon Is)" "GMT+12 (Auckland, Fiji, Kamchatka, Marshall Is., Wellington, Suva)" "GMT-1 (Azores, Cape Verde Is.)" "GMT-2 (Mid-Atlantic)" "GMT-3 (Brasilia, Buenos Aires, Georgetown)" "GMT-4 (Atlantic Time, Caracas)" "GMT-5 (Bogota, Lima, New York)" "GMT-6 (Mexico City, Saskatchewan, Chicago, Guatamala)" "GMT-7 (Denver, Edmonton, Mountain Time, Phoenix, Salt Lake City)" "GMT-8 (Anchorage, Los Angeles, San Francisco, Seattle)" "GMT-9 (Alaska)" "GMT-10 (Hawaii, Honolulu)" "GMT-11 (Midway Island, Samoa)" "GMT-12 (Eniwetok, Kwaialein)" "UTC" "Universal" --width=500 --height=450) || [ "x$timezone" = "x" ] ; do
+       zenity --title="Error" --error --text="Please select a time zone." --timeout=6
 done
 timezone=`echo $timezone | sed  's/(.*)//g'`
 echo $timezone
@@ -14,6 +14,7 @@ date_d=`date +%d | sed 's/^0//'`
 date_m=`date +%m`
 date_y=`date +%Y`
 
+
 while ! date=$(zenity --calendar --text="Please select the current date" --title "Please select the current date" --day=$date_d --month=$date_m --year=$date_y --date-format="%Y%m%d" --width=500) || [ "x$date" = "x" ] ; do
         zenity --title="Error" --error --text="Please select the date." --timeout 6
 done
index c8f1253..49861d5 100755 (executable)
@@ -13,7 +13,7 @@ case $mainsel in
     curbright=$(cat /sys/devices/platform/twl4030-pwm0-bl/backlight/twl4030-pwm0-bl/brightness)
     device=/sys/devices/platform/twl4030-pwm0-bl/backlight/twl4030-pwm0-bl/brightness
     if [ ! $1 ]; then
-      newbright=$(zenity --scale --text "set brightness" --min-value=$minbright --max-value=$maxbright --value=$curbright --step 1)
+      newbright=$(zenity --scale --text "Set brightness" --min-value=$minbright --max-value=$maxbright --value=$curbright --step 1)
     else
       newbright=$1
     fi
index c139290..e2d8e1d 100755 (executable)
@@ -12,7 +12,7 @@ case $mainsel in
    case $leftsel in
 
     "nub0mode")
-        if nubm=$(zenity --height=300 --list --title="Select Nub-mode for the left nub" --text="Please select the modus for the left nub.\n\nNote: This can affect running programs.\nSome programs also may change the nub mode themselves."  --column "return" --hide-column=1 --column "Nub Mode" "mouse" "Use the nub as mouse" "mbuttons" "Use the nub for mousebuttons" "scroll" "Use the nub for scrolling" "absolute" "Use the nub as joystick") ; then
+        if nubm=$(zenity --height=300 --list --title="Select Nub-mode for the left nub" --text="Please select the mode for the left nub.\n\nNote: This can affect running programs.\nSome programs also may change the nub mode themselves."  --column "return" --hide-column=1 --column "Nub Mode" "mouse" "Use the nub as mouse" "mbuttons" "Use the nub for mousebuttons" "scroll" "Use the nub for scrolling" "absolute" "Use the nub as joystick") ; then
 
         echo $nubm > /proc/pandora/nub0/mode
         fi;;
@@ -55,7 +55,7 @@ case $mainsel in
         sleep 1
         echo 0 > /sys/bus/i2c/drivers/vsense/3-0066/reset      
         done
-        echo curmode > /proc/pandora/nub0/mode
+        echo $curmode > /proc/pandora/nub0/mode
         ;;
      esac
    done
@@ -67,7 +67,7 @@ case $mainsel in
    case $rightsel in
   
     "nub1mode")
-        if nubm=$(zenity --height=300 --list --title="Select Nub-mode for the right nub" --text="Please select the modus for the right nub.\n\nNote: This can affect running programs.\nSome programs also may change the nub mode themselves."  --column "return" --hide-column=1 --column "Nub Mode" "mouse" "Use the nub as mouse" "mbuttons" "Use the nub for mousebuttons" "scroll" "Use the nub for scrolling" "absolute" "Use the nub as joystick") ; then
+        if nubm=$(zenity --height=300 --list --title="Select Nub-mode for the right nub" --text="Please select the mode for the right nub.\n\nNote: This can affect running programs.\nSome programs also may change the nub mode themselves."  --column "return" --hide-column=1 --column "Nub Mode" "mouse" "Use the nub as mouse" "mbuttons" "Use the nub for mousebuttons" "scroll" "Use the nub for scrolling" "absolute" "Use the nub as joystick") ; then
 
         echo $nubm > /proc/pandora/nub1/mode
         fi;;
@@ -110,7 +110,7 @@ case $mainsel in
         sleep 1
         echo 0 > /sys/bus/i2c/drivers/vsense/3-0067/reset      
         done
-        echo curmode > /proc/pandora/nub1/mode
+        echo $curmode > /proc/pandora/nub1/mode
         ;;
      esac
    done
index ae17c8e..7c0c336 100755 (executable)
@@ -3,14 +3,16 @@
 # Startup-Manager, v1.0, written by Michael Mrozek aka EvilDragon 2010 with some help by vimacs.
 # This scripts allows you to change various settings of the Pandora startup process.
 
-while mainsel=$(zenity --title="Startupmanager" --width="400" --height="250" --list --column "id" --column "Please select" --hide-column=1 --text="What do you want to do?" "gui" "Change Default GUI for current user" "login" "Enable/Disable Autologin" "user" "Select default user" "wifi" "Enable/Disable WiFi on Boot"); do
+while mainsel=$(zenity --title="Startup manager" --width="400" --height="250" --list --column "id" --column "Please select" --hide-column=1 --text="What do you want to do?" "gui" "Change Default GUI for current user" "login" "Enable/Disable auto login" "user" "Select default user" "wifi" "Enable/Disable WiFi on boot"); do
+
 
 case $mainsel in
 
 # Change default GUI
   "gui")
     user2=$(cat /tmp/currentuser)
-    selection=$(cat /etc/pandora/conf/gui.conf | awk -F\; '{print $1 "\n" $2 }' | zenity ---width=500 --height=300 --title="Change the Default GUI" --list --column "Name" --column "Description" --text "Please select the GUI you want to run as default startup" )
+    selection=$(cat /etc/pandora/conf/gui.conf | awk -F\; '{print $1 "\n" $2 }' | zenity ---width=500 --height=300 --title="Change the default GUI" --list --column "Name" --column "Description" --text "Please select the GUI you want to run as default startup" )
+
     echo $selection
 
     gui=$(grep $selection /etc/pandora/conf/gui.conf | awk -F\; '{print $3}')
@@ -24,21 +26,21 @@ case $mainsel in
    "login")
       if zenity --question --title="Autologin" --text="Do you wish to automatically login at startup?\n\nSecurity warning: This skips the password check on startup" --ok-label="Yes" --cancel-label="No"; then        
        sed -i 's/.*auto_login.*/auto_login yes/g' /etc/slim.conf
-       zenity --info --title="Changed Autologin" --text "Autologin is now enabled." --timeout 6
+       zenity --info --title="Changed auto login" --text "Auto login is now enabled." --timeout 6
       else
        sed -i 's/.*auto_login.*/auto_login no/g' /etc/slim.conf
-       zenity --info --title="Changed Autologin" --text "Autologin is now disabled." --timeout 6
+       zenity --info --title="Changed auto login" --text "Auto login is now disabled." --timeout 6
       fi;;
 
 # Select default user
     "user")
        if username=$(cat /etc/passwd | grep /home/ | grep -v root | awk -F\: '{print $1 }' | zenity --width=100 --height=200 --title="Select the default user" --list  --column "Username"  --text "Please select the default user\nor press Cancel to disable a default user.") ; then
          sed -i "s/.*default_user.*/default_user $username/g" /etc/slim.conf
-        zenity --info --title="Changed Default User" --text "The default user is now $username." --timeout 6
+        zenity --info --title="Changed default user" --text "The default user is now $username." --timeout 6
        else
        echo
        sed -i "s/.*default_user.*/default_user/g" /etc/slim.conf
-        zenity --info --title="Changed Default User" --text "The default user disabeled" --timeout 6
+        zenity --info --title="Changed default user" --text "The default user disabled" --timeout 6
        fi;;
 
 # Enable / Disable WiFi on boot