diff options
author | Babu Shanmugam <bschanmu@redhat.com> | 2016-11-16 15:43:11 +0530 |
---|---|---|
committer | Andy Zhou <azhou@ovn.org> | 2016-11-18 23:05:48 -0800 |
commit | c0a3597b16cd7a1c69605914eae7062aff04e356 (patch) | |
tree | d1c604d62741489b7596d352306583a6c6d93367 /debian | |
parent | a4245b7869c8943415a153dfe1878829991a553a (diff) | |
download | openvswitch-c0a3597b16cd7a1c69605914eae7062aff04e356.tar.gz |
ovn: Add ovndb servers ocf script in debian packager
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 <bschanmu@redhat.com>
Acked-by: Andy Zhou <azhou@ovn.org>
Signed-off-by: Andy Zhou <azhou@ovn.org>
Diffstat (limited to 'debian')
-rw-r--r-- | debian/automake.mk | 2 | ||||
-rw-r--r-- | debian/ovn-common.install | 1 | ||||
-rw-r--r-- | debian/ovn-common.postinst | 24 | ||||
-rw-r--r-- | debian/ovn-common.postrm | 23 |
4 files changed, 50 insertions, 0 deletions
diff --git a/debian/automake.mk b/debian/automake.mk index 2da7055f0..67b9c6be1 100644 --- a/debian/automake.mk +++ b/debian/automake.mk @@ -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 \ diff --git a/debian/ovn-common.install b/debian/ovn-common.install index ba9c343c7..99378af39 100644 --- a/debian/ovn-common.install +++ b/debian/ovn-common.install @@ -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 diff --git a/debian/ovn-common.postinst b/debian/ovn-common.postinst new file mode 100644 index 000000000..588044fbc --- /dev/null +++ b/debian/ovn-common.postinst @@ -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 diff --git a/debian/ovn-common.postrm b/debian/ovn-common.postrm new file mode 100644 index 000000000..9face726b --- /dev/null +++ b/debian/ovn-common.postrm @@ -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 |