mirror of
https://git.yoctoproject.org/poky
synced 2026-04-13 23:02:30 +02:00
modutils-initscripts: Fix modules.dep creation when USE_DEPMOD="0"
When having USE_DEPMOD="0" it is expected that in the first boot that the modules.dep is generated. To achieve this we need to check if modules.dep exists and has a size greater than zero. This verification also needs to be done regardless of whether the /etc/modules or /etc/modules-load.d directories exist. (From OE-Core rev: 572f3045faa0a937947fbd56bcfef7bad55e9da6) Signed-off-by: Diego Sueiro <diego.sueiro@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
9e8247100e
commit
f01675db34
@@ -13,14 +13,16 @@
|
||||
|
||||
LOAD_MODULE=modprobe
|
||||
[ -f /proc/modules ] || exit 0
|
||||
[ -f /etc/modules ] || [ -d /etc/modules-load.d ] || exit 0
|
||||
[ -e /sbin/modprobe ] || LOAD_MODULE=insmod
|
||||
|
||||
if [ ! -f /lib/modules/`uname -r`/modules.dep ]; then
|
||||
# Test if modules.dep exists and has a size greater than zero
|
||||
if [ ! -s /lib/modules/`uname -r`/modules.dep ]; then
|
||||
[ "$VERBOSE" != no ] && echo "Calculating module dependencies ..."
|
||||
depmod -Ae
|
||||
fi
|
||||
|
||||
[ -f /etc/modules ] || [ -d /etc/modules-load.d ] || exit 0
|
||||
[ -e /sbin/modprobe ] || LOAD_MODULE=insmod
|
||||
|
||||
loaded_modules=" "
|
||||
|
||||
process_file() {
|
||||
|
||||
Reference in New Issue
Block a user