summaryrefslogtreecommitdiff
path: root/debian/openvswitch-datapath-module-_KVERS_.postinst.modules.in
blob: 0268300821411881ca8e1b35402eb1be37e0502b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh
# postinst script for #PACKAGE#
#
# see: dh_installdeb(1)

set -e

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/openvswitch-switch
if test -x $INIT && $INIT status; then
    $INIT restart || true
fi

exit 0