Skip to content

Commit

Permalink
Add test if localtime is a symlink, Closes: #843780
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Lange committed Nov 18, 2016
1 parent 96323ce commit a1c554c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion examples/simple/scripts/FAIBASE/10-misc
Expand Up @@ -5,7 +5,11 @@
error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error code

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

if [ -n "$IPADDR" ]; then
ifclass DHCPC || ainsl -s /etc/hosts "$IPADDR $HOSTNAME.$DOMAIN $HOSTNAME"
Expand Down

0 comments on commit a1c554c

Please sign in to comment.