X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=debian%2Fopenflow-datapath-module-_KVERS_.postinst.modules.in;h=6974e13a5000aaf8bdccd515e25beee93c8d6fb7;hb=refs%2Fheads%2Ffor-nox%2F0.4;hp=49e52d63aea3a15a5d78a4b37ca4edeb18e6f83f;hpb=62fd5fc4479700b595566c4907cfb8d34ba549e9;p=sliver-openvswitch.git diff --git a/debian/openflow-datapath-module-_KVERS_.postinst.modules.in b/debian/openflow-datapath-module-_KVERS_.postinst.modules.in index 49e52d63a..6974e13a5 100755 --- a/debian/openflow-datapath-module-_KVERS_.postinst.modules.in +++ b/debian/openflow-datapath-module-_KVERS_.postinst.modules.in @@ -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