mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-01-26 22:41:05 +02:00
[PATCH] [qos-scripts] Reload modules with parameters specified
This patch makes qos-scripts reload a module when there is need to pass some parameters to it. It fixes an issue on devices with more than two interfaces where many IMQ devices are needed but the module is already loaded with the default numdevs=2 Signed-off-by: Vasilis Tsiligiannis <b_tsiligiannis@silverton.gr> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15945 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
720a7832f1
commit
0f805cdf51
@ -1,12 +1,21 @@
|
||||
#!/bin/sh
|
||||
[ -e /etc/functions.sh ] && . /etc/functions.sh || . ./functions.sh
|
||||
[ -x /sbin/modprobe ] && insmod="modprobe" || insmod="insmod"
|
||||
[ -x /sbin/modprobe ] && {
|
||||
insmod="modprobe"
|
||||
rmmod="$insmod -r"
|
||||
} || {
|
||||
insmod="insmod"
|
||||
rmmod="rmmod"
|
||||
}
|
||||
|
||||
add_insmod() {
|
||||
eval "export isset=\${insmod_$1}"
|
||||
case "$isset" in
|
||||
1) ;;
|
||||
*) append INSMOD "$insmod $* >&- 2>&-" "$N"; export insmod_$1=1;;
|
||||
*) {
|
||||
[ "$2" ] && append INSMOD "$rmmod $1 >&- 2>&-" "$N"
|
||||
append INSMOD "$insmod $* >&- 2>&-" "$N"; export insmod_$1=1
|
||||
};;
|
||||
esac
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user