X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=debian%2Fopenvswitch-switch.postinst;h=c50853a11879da0501c88060c5734745b1139f5f;hb=97d6520bea3b779d1acee7b1b2fd8ed60269078f;hp=74b52ba90f09644982d1b98fcaf9efed7ba6bb94;hpb=064af42167bf4fc9aaea2702d80ce08074b889c0;p=openvswitch diff --git a/debian/openvswitch-switch.postinst b/debian/openvswitch-switch.postinst index 74b52ba9..c50853a1 100755 --- a/debian/openvswitch-switch.postinst +++ b/debian/openvswitch-switch.postinst @@ -44,6 +44,23 @@ 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 + #DEBHELPER# exit 0