debian: Use a different way to avoid failing install without kernel module.
[sliver-openvswitch.git] / debian / openvswitch-switch.init
index cb9670c..36dd5f9 100755 (executable)
@@ -56,6 +56,13 @@ start () {
             echo "For instructions, read"
        fi
        echo "/usr/share/doc/openvswitch-datapath-source/README.Debian"
+
+       if test X"$OVS_MISSING_KMOD_OK" = Xyes; then
+           # We're being invoked by the package postinst.  Do not
+           # fail package installation just because the kernel module
+           # is not available.
+           exit 0
+       fi
     fi
     set ovs_ctl ${1-start} --system-id=random
     if test X"$FORCE_COREFILES" != X; then