X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=openpandora.oe.git;a=blobdiff_plain;f=recipes%2Fpandora-system%2Fpandora-first-run-wizard%2Ffirst-run-wizard.sh;h=327f817f211a44e5219a0403521434c467f55282;hp=dae3efbe1958105d96d3ce772a3d1c10dd9d3ede;hb=30dd378df8c729bb7ee8a77c3f05bbcd65e34826;hpb=2c22b7e6503881433cfc4f8c3a47266ce25c9e32 diff --git a/recipes/pandora-system/pandora-first-run-wizard/first-run-wizard.sh b/recipes/pandora-system/pandora-first-run-wizard/first-run-wizard.sh index dae3efb..327f817 100755 --- a/recipes/pandora-system/pandora-first-run-wizard/first-run-wizard.sh +++ b/recipes/pandora-system/pandora-first-run-wizard/first-run-wizard.sh @@ -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