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
|
||||
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user