From 0e2ed4fdb8ce26e91791a8243d660fdbd84aaa4e Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Wed, 8 May 2013 09:46:36 +0200 Subject: [PATCH] more tz fixes --- usr/lib/initcpio/install/arch_tz | 1 + usr/share/archboot/tz/tz | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/usr/lib/initcpio/install/arch_tz b/usr/lib/initcpio/install/arch_tz index cc87e1088..659ac14d6 100644 --- a/usr/lib/initcpio/install/arch_tz +++ b/usr/lib/initcpio/install/arch_tz @@ -7,6 +7,7 @@ build () add_binary "/bin/date" add_binary "/usr/bin/ntpdate" add_binary "/usr/bin/ntpd" + add_file "/etc/npd.conf" for i in $(find /usr/share/zoneinfo ! -type d); do add_file $i done diff --git a/usr/share/archboot/tz/tz b/usr/share/archboot/tz/tz index 98537f4de..725318190 100755 --- a/usr/share/archboot/tz/tz +++ b/usr/share/archboot/tz/tz @@ -77,7 +77,7 @@ done dotimeset() { SET_TIME="" -USE_NTPDATE="" +USE_NTPD="" HARDWARECLOCK="" DATE_PROGRAM="" if [[ ! -s /tmp/.timezone ]]; then @@ -89,9 +89,9 @@ DIALOG --yesno "Do you want to use UTC for your clock?\n\nIf you choose 'YES' UT dohwclock DIALOG --cr-wrap --yesno "Your current time and date is:\n${DATE_PROGRAM}\n\nDo you want to change it?" 0 0 && SET_TIME="1" if [[ "${SET_TIME}" = "1" ]]; then - [[ $(which ntpdate) ]] && DIALOG --defaultno --yesno "'ntpdate' was detected on your system.\n\nDo you want to use 'ntpdate' for syncing your clock,\nby using the internet clock pool?\n(You need a working internet connection for doing this!)" 0 0 && USE_NTPDATE="1" - if [[ "${USE_NTPDATE}" = "1" ]]; then - if [[ ! $(ntpdate pool.ntp.org) ]]; then + [[ $(which ntpd) ]] && DIALOG --defaultno --yesno "'ntpd' was detected on your system.\n\nDo you want to use 'ntpd' for syncing your clock,\nby using the internet clock pool?\n(You need a working internet connection for doing this!)" 0 0 && USE_NTPD="1" + if [[ "${USE_NTPD}" = "1" ]]; then + if [[ ! $(timedatectl set-ntp 1) ]]; then DIALOG --msgbox "An error has occured, time was not changed!" 0 0 S_NEXTITEM="2" return 1