From: Michael Mrozek Date: Thu, 1 Jul 2010 23:03:39 +0000 (+0200) Subject: firs-run-wizard: Fixed: Spaces in hotnames (now will be replaced with X-Git-Tag: sz_beta3~235^2~51 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=openpandora.oe.git;a=commitdiff_plain;h=405df2828bf145f249ddf2139054a66cb57419d1 firs-run-wizard: Fixed: Spaces in hotnames (now will be replaced with _), Fixed: It's not possible to NOT select a default GUI. Temporary implemented: Remove unneeded daemons until this will done with the recipes. --- 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 68ac72d..0b3cb19 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 @@ -118,11 +118,13 @@ EOF # Pick a name for the OpenPandora. -while ! hostname=$(zenity --title="Name your Pandora" --entry --text "Please choose a name for your OpenPandora.\n\nIt should only contain letters, numbers and dashes." --entry-text "$username-openpandora") || [ "x$hostname" = "x" ]; do +while ! hostname=$(zenity --title="Name your Pandora" --entry --text "Please choose a name for your OpenPandora.\n\nIt should only contain letters, numbers and dashes, no spaces." --entry-text "$username-openpandora") || [ "x$hostname" = "x" ]; do zenity --title="Error" --error --text="Please try again." done + echo $hostname > /etc/hostname +sed 's/ /_/g' /etc/hostname echo "127.0.0.1 localhost.localdomain localhost $hostname" > /etc/hosts hostname -F /etc/hostname @@ -146,7 +148,10 @@ fi # Select the default interface and setup SLiM to pass that as a sesion to ~./.xinitrc -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 "select defaultgui" ) +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 + zenity --title="Error" --error --text="Please select a GUI." --timeout=6 +done + echo $selection gui=$(grep $selection /etc/pandora/conf/gui.conf | awk -F\; '{print $3}') @@ -206,6 +211,20 @@ zenity --info --title="Finished" --text "This concludes the First Boot Wizard.\n # ---- +# 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. +update-rc.d -f samba remove +update-rc.d -f xinetd +update-rc.d -f avahi-daemon +update-rc.d -f apmd +update-rc.d -f usb-gadget +update-rc.d -f banner +update-rc.d -f portmap +update-rc.d -f mountnfs +update-rc.d -f blueprobe +update-rc.d -f dropbear +update-rc.d -f wl1251-init + + # Write the control file so this script is not run on next boot # (hackish I know but I want the flexability to drop a new script in later esp. in the early firmwares).