I write a script called mod_test to load and unload a module.

if I run the mod_test in the command line, I can load and unload the module successfully


root@OpenWrt:/# mod_test
.....Module Loaded Successfully!



however , if I edit the  "/usr/lib/webif/apply.sh" and add  "/mod_test" as follows:



  "/tmp/.uci/network")
                        echo '@TR<<Reloading>> @TR<<network>> ...'
                        /etc/init.d/network restart
                        killall dnsmasq
                        if exists "/etc/rc.d/S??dnsmasq"; then
                                /etc/init.d/dnsmasq start
                        fi
                        /mod_test
                        ;;

When I change the network configuration through web interface and apply it , the script "mod_test" will run. But I found that  I could load the module but the system seemed not very stable and I could not unload the module.

I am very confused. I use the same script to load and unload the module. Why dose it work in the command line but doesn't work in the webpage by using "apply" button? Is there anything to do with the process of OpenWRT? How can I make it work by using webpage?

Look forward to your suggestions

(Last edited by kunshao9795 on 17 Jan 2008, 10:46)