#!/bin/bash
# local time

echo "-- $0 --"

. /etc/profile

cp /usr/share/zoneinfo/"${TIMEZONE}" /etc/localtime
echo "$TIMEZONE" > /etc/timezone

emerge net-misc/ntp
ntpdate "${TIMESERVER}"

# this will avoid looping of glibc compilation
hwclock -w

#sed -i.bck  's/^clock=.*/clock="CET"/' /etc/conf.d/hwclock
#sed -i.bck0  's/^clock_systohc.*/clock_systohc="YES"/' /etc/conf.d/hwclock
#sed -i.bck1  's/^clock_hctosys.*/clock_hctosys="NO"/' /etc/conf.d/hwclock
