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:28:54 +0000 (10:28 -0700)
commit0d4000c2f610fe4b7e5b19d3a5fe8dc7a0d5fd08
tree831efeb3cd19dfd747c20924b77ab67800dd5401
parent0c869d3808af7cd2e1500f40285d2dcc4773d28e
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