fi
done
fi
-
- if /etc/init.d/openvswitch-switch status >/dev/null 2>&1; then
- running=true
- /etc/init.d/openvswitch-switch stop
- else
- running=false
- fi
-
- if $running; then
- /etc/init.d/openvswitch-switch start
- fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
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
+
#DEBHELPER#
exit 0