From: Michael Mrozek Date: Sat, 7 Dec 2013 03:33:54 +0000 (+0100) Subject: first-run-wizard: Added setting /etc/timezone X-Git-Tag: sz_160~18 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e3a6a4bb7ccd6373ebbd1945269ed17390d0967;p=openpandora.oe.git first-run-wizard: Added setting /etc/timezone --- diff --git a/recipes/pandora-system/pandora-first-run-wizard.bb b/recipes/pandora-system/pandora-first-run-wizard.bb index 01bc68a..24cecc7 100755 --- a/recipes/pandora-system/pandora-first-run-wizard.bb +++ b/recipes/pandora-system/pandora-first-run-wizard.bb @@ -6,7 +6,7 @@ RDEPENDS = "hsetroot zenity dbus pandora-wallpaper-official tslib tslib-calibrat COMPATIBLE_MACHINE = "omap3-pandora" -PR = "r50" +PR = "r51" SRC_URI = " \ file://first-run-wizard.sh \ 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 fa80d02..75b4252 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 @@ -189,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//'` diff --git a/recipes/pandora-system/pandora-scripts/op_datetime.sh b/recipes/pandora-system/pandora-scripts/op_datetime.sh index 3debe69..358b398 100644 --- a/recipes/pandora-system/pandora-scripts/op_datetime.sh +++ b/recipes/pandora-system/pandora-scripts/op_datetime.sh @@ -2,7 +2,7 @@ # Set the timezone and date/time -while mainsel=$(zenity --title="Date / Time / Timezone" --width="400" --height="250" --list --column "id" --column "Please select" --hide-column=1 --text="You can set the time and date or select a different timezone.\n" "td" "Change Time and Date" "tz" "Select Timezone" "sync" "Sync time over Internet" --ok-label="Change Setting" --cancel-label="Exit"); do +while mainsel=$(zenity --title="Date / Time / Timezone" --width="400" --height="250" --list --column "id" --column "Please select" --hide-column=1 --text="You can set the time and date or select a different timezone.\n" "td" "Change Time and Date" "tz" "Select Timezone" "sync" "Sync time over Internet" "autosync" "Sync on network connection" --ok-label="Change Setting" --cancel-label="Exit"); do case $mainsel in @@ -19,6 +19,7 @@ case $mainsel in echo $timezone rm /etc/localtime && ln -s /usr/share/zoneinfo/$area/$timezone /etc/localtime + echo $area/$timezone >> /etc/timezone ;; "td") @@ -80,5 +81,12 @@ case $mainsel in xset s on fi ;; + "autosync") + if zenity --question --title="Autosync time" --text="The Pandora can automatically sync the time whenever you connect to a network.\n\nShould it do that?" --ok-label="Yes" --cancel-label="No"; then + chmod +x /etc/NetworkManager/dispatcher.d/ntpdate.sh + else + chmod -x /etc/NetworkManager/dispatcher.d/ntpdate.sh + fi + ;; esac done