debian: Use a different way to avoid failing install without kernel module.
authorBen Pfaff <blp@nicira.com>
Fri, 16 Mar 2012 21:18:05 +0000 (14:18 -0700)
committerBen Pfaff <blp@nicira.com>
Mon, 19 Mar 2012 17:56:52 +0000 (10:56 -0700)
commit4621c036205b8e7c9fe34507d14502455996bf10
treeaee0d6c708e5618b339fd614044734479215ce7d
parent4aa857a88bd441f85ceb91f8c44eae6bb46a3076
debian: Use a different way to avoid failing install without kernel module.

The dh_installinit --error-handler option makes a lot of sense, but after
playing with it for a while I could not figure out a nice way to use it
only for openvswitch-switch without either duplicating the dh_installinit
fragments in postinst and prerm (the actual bug that was reported) or
omitting them for some package.

Also, we forgot to write the error handler function for the prerm.

This commit switches to a different way to avoid failing the install when
the kernel module is not available, without using --error-handler.

CC: 663051@bugs.debian.org
Reported-by: Thomas Goirand <zigo@debian.org>
Reviewed-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
debian/openvswitch-switch.init
debian/openvswitch-switch.postinst
debian/rules