forgotten cvs add (setclock stuff)
[hdw-linux/hdw-linux.git] / packages / base / util-linux / setclock_conf
1 # hdw - linux /etc/conf/setclock
2 #
3 # defining set{sys,hw}clock functions used by /etc/init.d/setclock
4 # (copied from ROCK Linux + some additions)
5 #
6
7 UTC="off"
8
9 #
10 # set functions (called by /etc/init.d/setclock)
11 #
12
13 xx() { echo ">> $*" ; eval "$*" ; }
14
15 setsysclock() {
16         echo "setting system time according to hardware clock ..."
17         if [ ".$UTC" = ".on" ] ; then
18                 xx hwclock --hctosys --utc
19         else
20                 xx hwclock --hctosys --localtime
21         fi
22 }
23
24 sethwclock() {
25         echo "setting hardware clock according to system time ..."
26         if [ ".$UTC" = ".on" ] ; then
27                 xx hwclock --systohc --utc
28         else
29                 xx hwclock --systohc --localtime
30         fi
31 }