From 1d96620b84fe61dd231494c9cc8e4aa26a2df369 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 26 Oct 2008 07:09:02 +0000 Subject: 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 --- init.d/hwclock.in | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'init.d/hwclock.in') 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 -- cgit v1.2.3