aboutsummaryrefslogtreecommitdiff
path: root/init.d
diff options
context:
space:
mode:
Diffstat (limited to 'init.d')
-rw-r--r--init.d/hwclock.in8
1 files 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