[debian-lan-devel] [debian-lan] 01/01: Update timezone configuration from FAI upstream.

Andreas B. Mundt andi at moszumanska.debian.org
Tue Jan 24 16:24:42 UTC 2017


This is an automated email from the git hooks/post-receive script.

andi pushed a commit to branch master
in repository debian-lan.

commit 32489af29ddb56952b75c8758d490b8c9dfb4aa7
Author: Andreas B. Mundt <andi at debian.org>
Date:   Tue Jan 24 16:31:04 2017 +0100

    Update timezone configuration from FAI upstream.
---
 fai/config/scripts/DISKLESS_CLIENT/10-misc | 6 +++++-
 fai/config/scripts/FAIBASE/10-misc         | 6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/fai/config/scripts/DISKLESS_CLIENT/10-misc b/fai/config/scripts/DISKLESS_CLIENT/10-misc
index 5b89e95..63b756b 100755
--- a/fai/config/scripts/DISKLESS_CLIENT/10-misc
+++ b/fai/config/scripts/DISKLESS_CLIENT/10-misc
@@ -17,7 +17,11 @@ sed -i "s/NAMESERVER/$IP/" $target/etc/resolv.conf
 
 ## timezone
 echo $TIMEZONE > $target/etc/timezone
-cp -f /usr/share/zoneinfo/${TIMEZONE} $target/etc/localtime
+if [ -L $target/etc/localtime ]; then
+    ln -sf /usr/share/zoneinfo/${TIMEZONE} $target/etc/localtime
+else
+    cp -f /usr/share/zoneinfo/${TIMEZONE} $target/etc/localtime
+fi
 
 # create keyboard layout table
 $ROOTCMD bash -c "echo 'console-data console-data/keymap/full select $KEYMAP' | debconf-set-selections"
diff --git a/fai/config/scripts/FAIBASE/10-misc b/fai/config/scripts/FAIBASE/10-misc
index f9cd4e3..2df5944 100755
--- a/fai/config/scripts/FAIBASE/10-misc
+++ b/fai/config/scripts/FAIBASE/10-misc
@@ -5,7 +5,11 @@
 error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error code
 
 echo $TIMEZONE    > $target/etc/timezone
-[ -f $target/etc/localtime ] || ln -sv $target/usr/share/zoneinfo/${TIMEZONE} $target/etc/localtime
+if [ -L $target/etc/localtime ]; then
+    ln -sf /usr/share/zoneinfo/${TIMEZONE} $target/etc/localtime
+else
+    cp -f /usr/share/zoneinfo/${TIMEZONE} $target/etc/localtime
+fi
 
 if [ -n "$IPADDR" ]; then
     ifclass DHCPC || ainsl -s /etc/hosts "$IPADDR $HOSTNAME.$DOMAIN $HOSTNAME"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/debian-lan.git



More information about the debian-lan-devel mailing list