Edit: Ok, the code is in /usr/sbin/updatenetmoduleslist.sh (not sure why it isn't just a function) - yep, looks like a predefined list will do - there is already an "$EXTRALIST" in a similar format, so it will actually simplify the code.
... just get rid of the /path/ and the .ko and replace the while loop with a for ONEBASE in $LIST; do ...
... but then there is a verbose dryrun of modprobe on each module, but the output goes to dev/null and the return is not used (why? needed for modinfo?)
... I would also replace the modinfo block containing a bunch of grep/head/cut/tr with a single modinfo and standard shell
Code: Select all
for NET_MODULE in $NET_MODULE_LIST;do
MOD_TYPE="" MOD_DESCR=""
modinfo $NET_MODULE |while read LINE || [ "$LINE" ] ; do
case "`echo $LINE`" in
alias*)[ "$MOD_TYPE" != "" ] && LINE="`echo ${LINE#*:}`" && MOD_TYPE=${LINE%%:*};;
description*)MOD_DESCR="`echo ${LINE#*:}`";;
esac
done
echo $NETMODULE' "'$ONETYPE': '$ONEDESCR'"'
done | sort -u > /etc/networkmodules