aboutsummaryrefslogtreecommitdiff
path: root/init.d
diff options
context:
space:
mode:
Diffstat (limited to 'init.d')
-rw-r--r--init.d/hwclock.in14
1 files changed, 8 insertions, 6 deletions
diff --git a/init.d/hwclock.in b/init.d/hwclock.in
index f2029f1f..424be2fe 100644
--- a/init.d/hwclock.in
+++ b/init.d/hwclock.in
@@ -74,12 +74,14 @@ start()
fi
ebegin "Setting system clock using the hardware clock [${utc}]"
- 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
+ if [ -e /proc/modules ]; then
+ local rtc=
+ for rtc in /dev/rtc /dev/rtc[0-9]*; do
+ [ -e "${rtc}" ] && break
+ done
+ if [ ! -e "${rtc}" ]; then
+ modprobe -q rtc-cmos || modprobe -q rtc || modprobe -q genrtc
+ fi
fi
if [ -e /etc/adjtime ] && yesno ${clock_adjfile}; then