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:41:37 +0000 (10:41 -0700)
commit43a2283f8a7e22de1b1237b7a5eb8c321ea12c77
tree39cc85732c855b8aa9bbae206775f477f1919ef5
parentc0888adc527ee158e3c586efc09ee777aaddc9ee
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