When a new OpenFlow kernel module package is installed, restart the switch.

This helps to ensure that the secchan and the kernel module are exactly
the same version.
This commit is contained in:
Ben Pfaff committed 2008-11-05 10:22:41 -08:00
1 parent 8798af6e81
commit 0e061502c9
1 file changed
+11
@@ -9,6 +9,17 @@ depmod -a
#DEBHELPER#
# If the switch is running, restart it. This ensures that we are using the
# latest kernel module, because the init script will unload and reload the
# module.
#
# (Ideally we'd only want to do this if this package corresponds to the
# running kernel, but I don't know a reliable way to check.)
INIT=/etc/init.d/openflow-switch
if test -x $INIT && $INIT status; then
$INIT restart || true
fi
exit 0