diff -Nuar --exclude p --exclude '*.orig' openrc-0.2.5.orig/conf.d/hwclock openrc-0.2.5/conf.d/hwclock --- openrc-0.2.5.orig/conf.d/hwclock 2008-05-28 06:39:52.000000000 -0700 +++ openrc-0.2.5/conf.d/hwclock 2008-09-03 12:52:55.156122454 -0700 @@ -12,3 +12,7 @@ # If you wish to pass any other arguments to hwclock during bootup, # you may do so here. Alpha users may wish to use --arc or --srm here. clock_args="" + +# If you wish to use a specific RTC device, you should specify it here. +# You normally won't need to touch this. +clock_rtc_device="/dev/rtc" diff -Nuar --exclude p --exclude '*.orig' openrc-0.2.5.orig/init.d/hwclock.in openrc-0.2.5/init.d/hwclock.in --- openrc-0.2.5.orig/init.d/hwclock.in 2008-05-28 06:39:52.000000000 -0700 +++ openrc-0.2.5/init.d/hwclock.in 2008-09-03 13:00:02.788074931 -0700 @@ -21,6 +21,10 @@ utc_cmd="--localtime" fi +if [ "${clock_rtc_device}" != "/dev/rtc" ]; then + clock_args="${clock_args} --rtc=${clock_rtc_device}" +fi + depend() { provide clock @@ -73,11 +77,16 @@ return 0 fi - ebegin "Setting system clock using the hardware clock [${utc}]" - if [ -e /proc/modules -a ! -e /dev/rtc ]; then - modprobe -q rtc || modprobe -q genrtc + if [ -e /proc/modules -a ! -e ${clock_rtc_device} ]; then + ebegin "Probing for RTC module" + modprobe -q rtc-cmos || modprobe -q rtc || modprobe -q genrtc + [ -e ${clock_rtc_device} ] + retval=$? + eend $retval + [ $retval -ne 0 ] && return 1 fi + ebegin "Setting system clock using the hardware clock [${utc}]" if [ -e /etc/adjtime ] && yesno ${clock_adjfile}; then _hwclock --adjust ${utc_cmd} retval=$((${retval} + $?))