update-modules: update script to read /etc/modules-load.d/ directory
* show warning for old /etc/modutils/* files without .conf extension * v2: keep adding modules also from old /etc/modutils/* after showing warning, this way update-modules will be backward compatible also on images without kernel upgrade (From OE-Core rev: 38302a1353cf072b7c6c54f7f90936e4c2180102) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
c73e50a91e
commit
caaa5709b4
|
@ -103,8 +103,8 @@ createfile() {
|
||||||
$HEADER"
|
$HEADER"
|
||||||
#
|
#
|
||||||
# Please do not edit this file directly. If you want to change or add
|
# Please do not edit this file directly. If you want to change or add
|
||||||
# anything please take a look at the files in /etc/modutils and read
|
# anything please take a look at the files in /etc/modutils, /etc/modules-load.d
|
||||||
# the manpage for update-modules.
|
# and read the manpage for update-modules.
|
||||||
#
|
#
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
@ -161,12 +161,23 @@ fi
|
||||||
createfile "$MODCONFTMPFILE"
|
createfile "$MODCONFTMPFILE"
|
||||||
createfile "$MODULESTMPFILE"
|
createfile "$MODULESTMPFILE"
|
||||||
|
|
||||||
|
# well we're using /etc/modprobe.d/*.conf instead of /etc/modutils/*.conf anyway..
|
||||||
for cfg in /etc/modutils/* $CONF ; do
|
for cfg in /etc/modutils/* $CONF ; do
|
||||||
if [ -f "$cfg" ]; then # this check is necesarry to skip /etc/modutils/archs
|
if [ -f "$cfg" ]; then # this check is necesarry to skip /etc/modutils/archs
|
||||||
if echo $cfg | grep -q '\.dpkg-[a-z]*\|~$' ; then
|
if echo $cfg | grep -q '\.dpkg-[a-z]*\|~$' ; then
|
||||||
true
|
true
|
||||||
elif echo $cfg | grep -q '\.conf$' ; then
|
elif echo $cfg | grep -q '\.conf$' ; then
|
||||||
addfile "$cfg" "$MODCONFTMPFILE"
|
addfile "$cfg" "$MODCONFTMPFILE"
|
||||||
|
else
|
||||||
|
echo "Please migrate your $cfg file to /etc/modules-load.d/*.conf"
|
||||||
|
addfile "$cfg" "$MODULESTMPFILE"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
for cfg in /etc/modules-load.d/*.conf; do
|
||||||
|
if [ -f "$cfg" ]; then # this check is necesarry to skip weird entries
|
||||||
|
if echo $cfg | grep -q '\.dpkg-[a-z]*\|~$' ; then
|
||||||
|
true
|
||||||
else
|
else
|
||||||
addfile "$cfg" "$MODULESTMPFILE"
|
addfile "$cfg" "$MODULESTMPFILE"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://${WORKDIR}/COPYING.GPL;md5=751419260aa954499f7abaabaa
|
||||||
|
|
||||||
RDEPENDS_${PN} = "module-init-tools-depmod"
|
RDEPENDS_${PN} = "module-init-tools-depmod"
|
||||||
|
|
||||||
PR = "r12"
|
PR = "r13"
|
||||||
|
|
||||||
SRC_URI = "file://update-modules \
|
SRC_URI = "file://update-modules \
|
||||||
file://COPYING.GPL"
|
file://COPYING.GPL"
|
||||||
|
|
Loading…
Reference in New Issue