op_datetime and pandora-first-run-wizard: Fixed problem that calendar didn't appear...
[openpandora.oe.git] / recipes / pandora-system / pandora-first-run-wizard / first-run-wizard.sh
index dae3efb..327f817 100755 (executable)
@@ -124,7 +124,8 @@ done
 
 
 echo $hostname > /etc/hostname
-sed 's/ /_/g' /etc/hostname
+hostname =$(sed 's/ /_/g' /etc/hostname)
+echo $hostname > /etc/hostname
 echo "127.0.0.1 localhost.localdomain localhost $hostname" > /etc/hosts
 hostname -F /etc/hostname
 
@@ -148,8 +149,12 @@ fi
 
 # Select the default interface and setup SLiM to pass that as a sesion to ~./.xinitrc
 
-while ! selection=$(cat /etc/pandora/conf/gui.conf | awk -F\; '{print $1 "\n" $2 }' | zenity --width=500 --height=300 --title="Select the Default GUI" --list --column "Name" --column "Description" --text "Please select the Default GUI" ); do
+selection=""
+while [ x$selection = x ]; do
+selection=$(cat /etc/pandora/conf/gui.conf | awk -F\; '{print $1 "\n" $2 }' | zenity --width=500 --height=300 --title="Select the Default GUI" --list --column "Name" --column "Description" --text "Please select the Default GUI" )
+if [ x$selection = x ]; then
   zenity --title="Error" --error --text="Please select a GUI." --timeout=6
+fi
 done
 
 echo $selection
@@ -180,7 +185,7 @@ echo rm /etc/localtime && ln -s /usr/share/zoneinfo/Etc/$timezone /etc/localtime
 
 #Make sure we clean up any leading zeros in the day (as Zenity freaks out)
 date_d=`date +%d | sed 's/^0//'`
-date_m=`date +%m`
+date_m=`date +%m`| sed 's/^0//'`
 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