hwclock: fix module load warning
This commit is contained in:
parent
ba10793b0b
commit
841b883825
@ -80,6 +80,15 @@ get_noadjfile()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rtc_exists()
|
||||||
|
{
|
||||||
|
local rtc=
|
||||||
|
for rtc in /dev/rtc /dev/rtc[0-9]*; do
|
||||||
|
[ -e "$rtc" ] && break
|
||||||
|
done
|
||||||
|
[ -e "$rtc" ]
|
||||||
|
}
|
||||||
|
|
||||||
start()
|
start()
|
||||||
{
|
{
|
||||||
local retval=0 errstr="" modname
|
local retval=0 errstr="" modname
|
||||||
@ -92,17 +101,13 @@ start()
|
|||||||
|
|
||||||
ebegin "Setting system clock using the hardware clock [$utc]"
|
ebegin "Setting system clock using the hardware clock [$utc]"
|
||||||
if [ -e /proc/modules ]; then
|
if [ -e /proc/modules ]; then
|
||||||
local rtc=
|
if ! rtc_exists; then
|
||||||
for rtc in /dev/rtc /dev/rtc[0-9]*; do
|
for x in rtc-cmos rtc genrtc; do
|
||||||
[ -e "$rtc" ] && break
|
modprobe -q $x && rtc_exists && modname="$x" && break
|
||||||
done
|
done
|
||||||
if [ ! -e "${rtc}" ]; then
|
[ -n "$modname" ] &&
|
||||||
for x in rtc-cmos rtc genrtc; do
|
ewarn "The $modname module needs to be configured in \
|
||||||
modprobe -q $x && modname=$x && break
|
@SYSCONFDIR@/conf.d/modules or built in."
|
||||||
done
|
|
||||||
[ -n "$modname" ] &&
|
|
||||||
ewarn "The $modname module needs to be configured in \
|
|
||||||
@SYSCONFDIR@/conf.d/modules or built in."
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user