On Fri, Jun 19, 2009 at 5:50 AM, Marek Lindnerlindner_marek@yahoo.de wrote:
On Friday 19 June 2009 02:42:54 Jacob Marble wrote:
When I "opkg remove kmod-batman-adv-kernelland", the kernel module stays loaded, so when I "opkg install kmod-batman-adv-[newer version]" the old module stays loaded. A simple rmmod gets rid of the old module.
I thought of that more as a feature as it allows over the mesh updates. If I the module gets removed while running an update over the mesh you might render your node unusable. On the other hand you can reboot the node after the update was completed to have a consistent system.
Hmm, you're right there. Too bad there isn't a way to "opkg remove X --preserve-loaded-modules"
There is a script in the openwrt SVN called postinst that inserts the module after install. Very convenient. A similar script could be added, called prerm, that would remove the module before removing the ipk. There are several ways to rmmod; "rmmod -f batman-adv" might be best for removing the package.
When I create the file in my build_dir, make just deletes it, so I leave this up to someone else (Marek?).
You have to place the script into the corresponding package folder (batman-adv in this case) to avoid deletion. For OpenWRT the package directory is the source (nothing will be deleted there) and build_dir is the build path.
If you agree to the point mentioned above I still could add your script but keep it deactivated, so that other people can find it. May be someone has an idea how to keep everyone happy. :-)