pandora-scripts: fix echo redirect
[openpandora.oe.git] / recipes / pandora-system / pandora-first-run-wizard / first-run-wizard.sh
index f34325f..806df0d 100755 (executable)
@@ -30,6 +30,9 @@ fi
   fi
 fi
 
+# Enable TV Out
+/usr/pandora/scripts/op_tvout.sh
+
 # Default error message (should a user hit cancel, validation fail etc.).
 ERROR_WINDOW='zenity --title="Error" --error --text="Sorry! Please try again." --timeout 6'
 
@@ -186,6 +189,7 @@ done
 
 echo $timezone
 rm /etc/localtime && ln -s /usr/share/zoneinfo/$area/$timezone /etc/localtime
+echo "$area/$timezone" > /etc/timezone
 
 #Make sure we clean up any leading zeros in the day (as Zenity freaks out)
 date_d=`date +%d | sed 's/^0//'`
@@ -292,6 +296,19 @@ if [ "$pnd_version" == "1GHz" ]; then
 
 esac
 
+#Enable / Disable TV Out on Startup
+
+if zenity --question --title="TV Out on startup" --text="Do you want to enable the TV Output on startup?\n(Note: This needs a bit more power)" --ok-label="Enable TV Out" --cancel-label="Disable TV Out"; then 
+         touch /etc/pandora/conf/tvout.state
+         zenity --info --title="TV Out" --text "TV Out will be switched on with the last saved settings on bootup." --timeout 6
+       else
+       /usr/pandora/scripts/op_tvout.sh -d
+         if [ -f /etc/pandora/conf/tvout.state ]; then
+               rm /etc/pandora/conf/tvout.state
+         fi
+         zenity --info --title="TV Out" --text "TV Out will not be switched on on bootup." --timeout 6
+fi     
+
 # ----
 
 # NOTE: This is just a temporary fix! These daemons should be removed from startup in the OE recipes. Until the time is found, we'll do it from here.
@@ -339,7 +356,7 @@ chmod 0666 /etc/pandora/first-boot
 
 # Let the user run optional config stuff.
 
-while mainsel=$(zenity --title="Optional settings" --width="400" --height="300" --list --column "id" --column "Please select" --hide-column=1 --text="This concludes the mandatory part of the First Boot Wizard.\n\nYou can now either continue to boot the system or change some more settings.\n\n\nThank you for buying the OpenPandora. Enjoy using the device." "speed" "Advanced CPU-Speed and Overclocking-Settings" "startup" "Advanced Startup-Settings" "lcd" "LCD-Settings" --ok-label="Change selected Setting" --cancel-label="Finish Setup"); do
+while mainsel=$(zenity --title="Optional settings" --width="400" --height="300" --list --column "id" --column "Please select" --hide-column=1 --text="This concludes the mandatory part of the First Boot Wizard.\n\nYou can now either continue to boot the system or change some more settings.\n\n\nThank you for buying the OpenPandora. Enjoy using the device." "speed" "Advanced CPU-Speed and Overclocking-Settings" "startup" "Advanced Startup-Settings" "video" "Video Settings" --ok-label="Change selected Setting" --cancel-label="Finish Setup"); do
 
 case $mainsel in
   "speed")
@@ -351,7 +368,7 @@ case $mainsel in
   /usr/pandora/scripts/op_startupmanager.sh
   ;;
 
-   "lcd")
+   "video")
   /usr/pandora/scripts/op_lcdsettings.sh
   ;;