#!/bin/sh

CNFREPO="/tmp/.cnfrepo"
TZDIR="/usr/share/zoneinfo"


if [ ! -e $CNFREPO ];
then
  exit
fi

# Read repository
eval "$( coconcnf_get -b -m "$CNFREPO" | grep "^COCON_TIMEZONE=" )"

# if set COCON_TIMEZONE, change timezone
if [ -z "$COCON_TIMEZONE" ];
then
  ln -sf "$TZDIR/$COCON_TIMEZONE" /etc/localtime
fi

exit 0
