Import from old repository commit 61ef2b42a9c4ba8e1600f15bb0236765edc2ad45.
[sliver-openvswitch.git] / debian / openvswitch-datapath-module-_KVERS_.postinst.modules.in
1 #!/bin/sh
2 # postinst script for #PACKAGE#
3 #
4 # see: dh_installdeb(1)
5
6 set -e
7
8 depmod -a
9
10 #DEBHELPER#
11
12 # If the switch is running, restart it.  This ensures that we are using the
13 # latest kernel module, because the init script will unload and reload the
14 # module.
15 #
16 # (Ideally we'd only want to do this if this package corresponds to the
17 # running kernel, but I don't know a reliable way to check.)
18 INIT=/etc/init.d/openvswitch-switch
19 if test -x $INIT && $INIT status; then
20     $INIT restart || true
21 fi
22
23 exit 0
24
25