]>
Commit | Line | Data |
---|---|---|
064af421 BP |
1 | #!/bin/sh |
2 | # postinst script for #PACKAGE# | |
3 | # | |
4 | # see: dh_installdeb(1) | |
5 | ||
6 | set -e | |
7 | ||
064af421 BP |
8 | #DEBHELPER# |
9 | ||
2c11563a GS |
10 | # If the kernel module is already loaded, we have nothing to do here. |
11 | # A force-reload-kmod should be run manually to use the new kernel module. | |
12 | if [ -e /sys/module/openvswitch ] || [ -e /sys/module/openvswitch_mod ]; then | |
13 | exit 0 | |
14 | fi | |
15 | ||
16 | # If the kernel module is not loaded, then it is likely because none | |
17 | # was installed before and therefore Open vSwitch couldn't be started. | |
18 | # Try to start it now. | |
064af421 BP |
19 | # |
20 | # (Ideally we'd only want to do this if this package corresponds to the | |
21 | # running kernel, but I don't know a reliable way to check.) | |
22 | INIT=/etc/init.d/openvswitch-switch | |
2c11563a GS |
23 | if test -x $INIT; then |
24 | $INIT start || true | |
064af421 BP |
25 | fi |
26 | ||
27 | exit 0 |