qos-scripts: replace modprobe by rmmod

modprobe -r is not available on all platforms, hence use rmmod

Signed-off-by: Manas Sambhus <manas.sambhus+github@gmail.com>
This commit is contained in:
Manas Sambhus 2022-07-09 12:03:43 +05:30 committed by Christian Marangi
parent 4cc7011da0
commit 0ca634e9ef
No known key found for this signature in database
GPG Key ID: AC001D09ADBFEAD7

View File

@ -2,11 +2,10 @@
[ -e /lib/functions.sh ] && . /lib/functions.sh || . ./functions.sh
[ -x /sbin/modprobe ] && {
insmod="modprobe"
rmmod="$insmod -r"
} || {
insmod="insmod"
rmmod="rmmod"
}
rmmod="rmmod"
add_insmod() {
eval "export isset=\${insmod_$1}"