aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdebian/openvswitch-switch.init7
-rwxr-xr-xdebian/openvswitch-switch.postinst18
-rwxr-xr-xdebian/rules3
3 files changed, 10 insertions, 18 deletions
diff --git a/debian/openvswitch-switch.init b/debian/openvswitch-switch.init
index cb9670cb..36dd5f92 100755
--- a/debian/openvswitch-switch.init
+++ b/debian/openvswitch-switch.init
@@ -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
diff --git a/debian/openvswitch-switch.postinst b/debian/openvswitch-switch.postinst
index c50853a1..7b9d7bc8 100755
--- a/debian/openvswitch-switch.postinst
+++ b/debian/openvswitch-switch.postinst
@@ -44,25 +44,11 @@ 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
#DEBHELPER#
exit 0
-
-
diff --git a/debian/rules b/debian/rules
index 4160025a..24c9850f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -134,8 +134,7 @@ binary-common:
dh_installexamples
dh_installdebconf
dh_installlogrotate
- dh_installinit -R -Nopenvswitch-switch
- dh_installinit -R -popenvswitch-switch --error-handler=init_script_error
+ dh_installinit -R
dh_installcron
dh_installman --language=C
dh_link