Merge "insmod.sh: Support 'rmmod' directive" into main

This commit is contained in:
Treehugger Robot 2024-10-24 20:05:47 +00:00 committed by Android (Google) Code Review
commit 268ba1bac8

View file

@ -1,11 +1,11 @@
#!/vendor/bin/sh #!/vendor/bin/sh
############################################################# ###################################################################
### init.insmod.cfg format: ### ### init.insmod.cfg format: ###
### ----------------------------------------------------- ### ### ----------------------------------------------------------- ###
### [insmod|setprop|enable/moprobe|wait] [path|prop name] ### ### [insmod|setprop|enable|moprobe|rmmod|wait] [path|prop name] ###
### ... ### ### ... ###
############################################################# ###################################################################
modules_dir= modules_dir=
system_modules_dir= system_modules_dir=
@ -96,6 +96,7 @@ if [ -f $cfg_file ]; then
modprobe -a -d "${modules_dir}" $arg modprobe -a -d "${modules_dir}" $arg
fi fi
;; ;;
"rmmod") rmmod $arg ;;
"wait") wait_for_file $arg ;; "wait") wait_for_file $arg ;;
esac esac
done < $cfg_file done < $cfg_file