lfs/bootscripts/lfs/init.d/setclock
Bruce Dubbs 63f6e21758 Change the bootsripts and udev configuration so the rtc is set by udev upon boot.
Removed aio device from udev configuration so defaults are used.


git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@8902 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2009-05-23 12:29:29 +00:00

48 lines
834 B
Bash

#!/bin/sh
########################################################################
# Begin $rc_base/init.d/setclock
#
# Description : Setting Linux Clock
#
# Authors : Gerard Beekmans - gerard@linuxfromscratch.org
#
# Version : 00.00
#
# Notes :
#
########################################################################
. /etc/sysconfig/rc
. ${rc_functions}
. /etc/sysconfig/clock
case "${UTC}" in
yes|true|1)
CLOCKPARAMS="${CLOCKPARAMS} --utc"
;;
no|false|0)
CLOCKPARAMS="${CLOCKPARAMS} --localtime"
;;
esac
case ${1} in
start)
boot_mesg "Setting system clock..."
hwclock --hctosys ${CLOCKPARAMS} >/dev/null
evaluate_retval
;;
stop)
boot_mesg "Setting hardware clock..."
hwclock --systohc ${CLOCKPARAMS} >/dev/null
evaluate_retval
;;
*)
echo "Usage: ${0} {start|stop}"
;;
esac