qos-scripts: replace modprobe by rmmod
authorManas Sambhus <manas.sambhus+github@gmail.com>
Sat, 9 Jul 2022 06:33:43 +0000 (12:03 +0530)
committerChristian Marangi <ansuelsmth@gmail.com>
Tue, 27 Sep 2022 15:16:45 +0000 (17:16 +0200)
modprobe -r is not available on all platforms, hence use rmmod

Signed-off-by: Manas Sambhus <manas.sambhus+github@gmail.com>
package/network/config/qos-scripts/files/usr/lib/qos/generate.sh

index 62e7283633e08ef826654e0168233da1a839ca22..12e085a3dfa4a8d4d7ec23bd952d6172e01d0265 100755 (executable)
@@ -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}"