Currently, every time we install the non-dkms openvswitch kernel package,
we restart openvswitch. This has no useful effect when an Open vSwitch kernel
module is already loaded, because "/etc/init.d/openvswitch restart" does not
load the new version of the kernel module.
With this patch, we start openvswitch if there is no kernel module
currently loaded (which is a case for a fresh install of openvswitch). This
will load the kernel module.
If someone wants to use the latest kernel module after an upgrade, they need
to run "/etc/init.d/openvswitch-switch force-reload-kmod" manually.
Issue #13556
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Until now, the postinst for kernel modules built by the Debian packaging
has simply run "depmod -a", which is wrong, since this command rebuilds
the dependencies for the *running* kernel, which is not necessarily the
kernel for which modules are being installed.
The dh_installmodules script automatically adds the correct invocation of
depmod to the postinst script, so this commit switches to using that
instead.
This commit moves the kernel modules from /lib/modules/$KVERS into the
"kernel" subdirectory of that directory because dh_installmodules does not
support modules that are directly in the $KVERS directory.
CC: Sajjad Lateef <slateef@nicira.com>