]> git.proxmox.com Git - mirror_ovs.git/blame - debian/openvswitch-datapath-module-_KVERS_.postinst.modules.in
datapath-windows: Add code for OvsGetQueue.
[mirror_ovs.git] / debian / openvswitch-datapath-module-_KVERS_.postinst.modules.in
CommitLineData
064af421
BP
1#!/bin/sh
2# postinst script for #PACKAGE#
3#
4# see: dh_installdeb(1)
5
6set -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.
12if [ -e /sys/module/openvswitch ] || [ -e /sys/module/openvswitch_mod ]; then
13 exit 0
14fi
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.)
22INIT=/etc/init.d/openvswitch-switch
2c11563a
GS
23if test -x $INIT; then
24 $INIT start || true
064af421
BP
25fi
26
27exit 0