diff options
author | Mike Frysinger <vapier@gentoo.org> | 2008-10-26 07:09:02 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2008-10-26 07:09:02 +0000 |
commit | 1d96620b84fe61dd231494c9cc8e4aa26a2df369 (patch) | |
tree | 9a92eaec8a732a61fe6a90d5b16a9d5e1a0cc46b /init.d/hwclock.in | |
parent | d12bb5cf3c69d083b2829d0d66f31b0c3becdd64 (diff) |
hwclock: skip rtc checks if kernel lacks module support
Since we only use the result of the device scan to load modules, there is
no point in doing the scan if the kernel doesn't support modules in the
first place.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'init.d/hwclock.in')
-rw-r--r-- | init.d/hwclock.in | 14 |
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 |