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>
This commit is contained in:
parent
d12bb5cf3c
commit
1d96620b84
@ -74,12 +74,14 @@ start()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
ebegin "Setting system clock using the hardware clock [${utc}]"
|
ebegin "Setting system clock using the hardware clock [${utc}]"
|
||||||
local rtc=
|
if [ -e /proc/modules ]; then
|
||||||
for rtc in /dev/rtc /dev/rtc[0-9]*; do
|
local rtc=
|
||||||
[ -e "${rtc}" ] && break
|
for rtc in /dev/rtc /dev/rtc[0-9]*; do
|
||||||
done
|
[ -e "${rtc}" ] && break
|
||||||
if [ ! -e "${rtc}" -a -e /proc/modules ]; then
|
done
|
||||||
modprobe -q rtc-cmos || modprobe -q rtc || modprobe -q genrtc
|
if [ ! -e "${rtc}" ]; then
|
||||||
|
modprobe -q rtc-cmos || modprobe -q rtc || modprobe -q genrtc
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -e /etc/adjtime ] && yesno ${clock_adjfile}; then
|
if [ -e /etc/adjtime ] && yesno ${clock_adjfile}; then
|
||||||
|
Loading…
Reference in New Issue
Block a user