From abe94bec6f1300838212cf70b4afe08a943539da Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Sat, 27 Sep 2008 06:48:21 +0000 Subject: Load rtc-cmos if needed, Gentoo #235647 thanks to Robin Johnson. --- init.d/hwclock.in | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/init.d/hwclock.in b/init.d/hwclock.in index 9b1a87d5..f2029f1f 100644 --- a/init.d/hwclock.in +++ b/init.d/hwclock.in @@ -74,8 +74,12 @@ start() 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 + local rtc= + for rtc in /dev/rtc /dev/rtc[0-9]*; do + [ -e "${rtc}" ] && break + done + if [ ! -e "${rtc}" -a -e /proc/modules ]; then + modprobe -q rtc-cmos || modprobe -q rtc || modprobe -q genrtc fi if [ -e /etc/adjtime ] && yesno ${clock_adjfile}; then -- cgit v1.2.3