Setting tag sliver-openvswitch-2.2.90-1
[sliver-openvswitch.git] / debian / openvswitch-switch.postinst
index c50853a..2464572 100755 (executable)
@@ -44,25 +44,16 @@ case "$1" in
         ;;
 esac
 
-HAVE_KMOD="no"
-
-init_script_error () {
-       if test X"$HAVE_KMOD" = Xno; then
-               exit 0
-       fi
-       exit 1
-}
-
 # Do not fail package installation just because the kernel module
 # is not available.
-if test -x /etc/init.d/openvswitch-switch; then
-    if invoke-rc.d openvswitch-switch load-kmod; then
-       HAVE_KMOD="yes"
-    fi
-fi
+OVS_MISSING_KMOD_OK=yes
+export OVS_MISSING_KMOD_OK
+
+# force-reload-kmod during upgrade. If a user wants to override this,
+# they can set the variable OVS_FORCE_RELOAD_KMOD=no while installing.
+[ -z "${OVS_FORCE_RELOAD_KMOD}" ] && OVS_FORCE_RELOAD_KMOD=yes || true
+export OVS_FORCE_RELOAD_KMOD
 
 #DEBHELPER#
 
 exit 0
-
-