# hdw - linux /etc/conf/setclock # # defining set{sys,hw}clock functions used by /etc/init.d/setclock # (copied from ROCK Linux + some additions) # UTC="off" # # set functions (called by /etc/init.d/setclock) # xx() { echo ">> $*" ; eval "$*" ; } setsysclock() { echo "setting system time according to hardware clock ..." if [ ".$UTC" = ".on" ] ; then xx hwclock --hctosys --utc else xx hwclock --hctosys --localtime fi } sethwclock() { echo "setting hardware clock according to system time ..." if [ ".$UTC" = ".on" ] ; then xx hwclock --systohc --utc else xx hwclock --systohc --localtime fi }