update-kernel script prints warning even if extra firmware doesn't exist
update-kernel
Warning: extra firmware "" not found!
%<...
Install extra firmware only if modloopfw variable is not empty:
--- /sbin/update-kernel
+++ /tmp/update-kernel.new
@@ -293,14 +293,16 @@
fi
# install extra firmware files in modloop (i.e. not detected by modinfo)
-for _xfw in "$modloopfw"; do
- if [ -f "$ROOT/lib/firmware/$_xfw" ]; then
- install -pD "$ROOT/lib/firmware/$_xfw" \
- "$MODLOOP"/modules/firmware/"$_xfw"
- else
- echo "Warning: extra firmware \"$_xfw\" not found!"
- fi
-done
+if [ -n "$modloopfw" ]; then
+ for _xfw in "$modloopfw"; do
+ if [ -f "$ROOT/lib/firmware/$_xfw" ]; then
+ install -pD "$ROOT/lib/firmware/$_xfw" \
+ "$MODLOOP"/modules/firmware/"$_xfw"
+ else
+ echo "Warning: extra firmware \"$_xfw\" not found!"
+ fi
+ done
+fi
# include bluetooth firmware in modloop
if [ -e "$ROOT"/lib/modules/*/kernel/drivers/bluetooth/btbcm.ko ]; then
(from redmine: issue id 10526, created on 2019-05-31)