Skip to content

Commit

Permalink
ovn: Add ovndb servers ocf script in debian packager
Browse files Browse the repository at this point in the history
The OCF script will be present in the ovn-common package and installed
in the openvswitch scripts folder and a symbolic link to this file will
be created in the OCF resources folder.

The OCF resource agent name for this resource is ocf:ovn:ovndb-servers

Signed-off-by: Babu Shanmugam <[email protected]>
Acked-by: Andy Zhou <[email protected]>
Signed-off-by: Andy Zhou <[email protected]>
  • Loading branch information
anbu-enovance authored and azhou-nicira committed Nov 19, 2016
1 parent a4245b7 commit c0a3597
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 0 deletions.
2 changes: 2 additions & 0 deletions debian/automake.mk
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ EXTRA_DIST += \
debian/ovn-controller-vtep.manpages \
debian/ovn-common.install \
debian/ovn-common.manpages \
debian/ovn-common.postinst \
debian/ovn-common.postrm \
debian/ovn-docker.install \
debian/ovn-host.dirs \
debian/ovn-host.init \
Expand Down
1 change: 1 addition & 0 deletions debian/ovn-common.install
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ usr/bin/ovn-nbctl
usr/bin/ovn-sbctl
usr/bin/ovn-trace
usr/share/openvswitch/scripts/ovn-ctl
usr/share/openvswitch/scripts/ovndb-servers.ocf
24 changes: 24 additions & 0 deletions debian/ovn-common.postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/sh
# postinst script for ovn-common
#
# see: dh_installdeb(1)

set -e

case "$1" in
configure)
mkdir -p /usr/lib/ocf/resource.d/ovn
ln -sf /usr/share/openvswitch/scripts/ovndb-servers.ocf /usr/lib/ocf/resource.d/ovn/ovndb-servers
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;

*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac

#DEBHELPER#

exit 0
23 changes: 23 additions & 0 deletions debian/ovn-common.postrm
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/sh
# postrm script for openvswitch-testcontroller
#
# see: dh_installdeb(1)

set -e

case "$1" in
purge|remove)
rm -rf /usr/lib/ocf/resource.d/ovn
;;
upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;

*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
;;
esac

#DEBHELPER#

exit 0

0 comments on commit c0a3597

Please sign in to comment.