--- /dev/null
+# 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
+}
--- /dev/null
+#!/bin/sh
+#
+# hdw - linux /etc/init.d/setclock
+#
+# low level clock/time stuff
+#
+
+. /etc/conf/setclock
+
+case "$1"
+in
+ start)
+ setsysclock
+ ;;
+ stop)
+ sethwclock
+ ;;
+ restart)
+ $0 stop ; $0 start ;;
+ *)
+ echo "Usage: $0 { start | restart | stop }" ; exit 1 ;;
+esac
+
+exit 0