X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=debian%2Fopenvswitch-switch.postinst;h=c50853a11879da0501c88060c5734745b1139f5f;hb=d308be1dff713f762e6ae18c1764115b866db5a8;hp=4be5a30c76c60ee27c5a4799b31e71f7b3364d18;hpb=a0bc29a541fc7dc6e20137d5558e2094d614e6ab;p=openvswitch diff --git a/debian/openvswitch-switch.postinst b/debian/openvswitch-switch.postinst index 4be5a30c..c50853a1 100755 --- a/debian/openvswitch-switch.postinst +++ b/debian/openvswitch-switch.postinst @@ -33,17 +33,6 @@ case "$1" in 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) @@ -55,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