blob: 2241acfc52e24a3cafe676093e7d769bc597f6e8 (
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
26
27
|
#!/bin/sh
# postinst script for #PACKAGE#
#
# see: dh_installdeb(1)
set -e
#DEBHELPER#
# If the kernel module is already loaded, we have nothing to do here.
# A force-reload-kmod should be run manually to use the new kernel module.
if [ -e /sys/module/openvswitch ]; then
exit 0
fi
# If the kernel module is not loaded, then it is likely because none
# was installed before and therefore Open vSwitch couldn't be started.
# Try to start it now.
#
# (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; then
$INIT start || true
fi
exit 0
|