Skip to contentSkip to conversation

opkg doesn't rmmod

B.A.T.M.A.N. Jacob Marble 2 participants 3 messages Jun 18, 2009 – Jun 19, 2009

lore
Share & tools
lore
#0 lore raw

Using OpenWrt SVN and batman-advanced SVN (yay!).

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.

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?).

Jake

Signature · 3 lines
Jacob Marble
435 760 4321
[email protected]
#1 lore raw
Quoted 4 lines · 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.

Quoted 8 lines

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. :-)

Regards,
Marek

#2 lore raw
Quoted 6 lines · Marek Lindner
Quoted 4 lines · 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.

Quoted 6 lines

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"

Quoted 16 lines
Quoted 8 lines

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.  :-)