#! /bin/sh
# tzconfig - wrapper for tzselect to make /etc/localtime link
if [ -f /etc/timezone ]; then
        echo "Your current time zone is set to `cat /etc/timezone`"
        echo -n "Do you want to change that? [n]: "
        read ans
        if [ "x$ans" = "x" -o "$ans" = "n" -o "$ans" = "no" ]; then
                echo "Your time zone will not be changed"
                exit 0
        fi
fi
TIMEZONE="`/usr/bin/tzselect`"
rm -f /etc/timezone
echo "$TIMEZONE" > /etc/timezone
ln -sf /usr/share/zoneinfo/$TIMEZONE /etc/localtime
