aboutsummaryrefslogtreecommitdiff
path: root/init.d/hwclock.in
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-09-27 06:48:21 +0000
committerRoy Marples <roy@marples.name>2008-09-27 06:48:21 +0000
commitabe94bec6f1300838212cf70b4afe08a943539da (patch)
tree252164d14d693f684ef048c4a835ab153fdb6d81 /init.d/hwclock.in
parentc3e192a8348fd4731ed9806ab046f5d2e1201625 (diff)
Load rtc-cmos if needed, Gentoo #235647 thanks to Robin Johnson.
Diffstat (limited to 'init.d/hwclock.in')
-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