debian: Use dh_installmodules instead of calling "depmod" wrongly.
[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 #DEBHELPER#
9
10 # If the switch is running, restart it.  This ensures that we are using the
11 # latest kernel module, because the init script will unload and reload the
12 # module.
13 #
14 # (Ideally we'd only want to do this if this package corresponds to the
15 # running kernel, but I don't know a reliable way to check.)
16 INIT=/etc/init.d/openvswitch-switch
17 if test -x $INIT && $INIT status; then
18     $INIT restart || true
19 fi
20
21 exit 0
22
23