From patchwork Fri Sep 16 11:15:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Babu Shanmugam X-Patchwork-Id: 670808 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (archives.nicira.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 3sbCQK2LTdz9sCZ for ; Fri, 16 Sep 2016 21:16:09 +1000 (AEST) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 8871610919; Fri, 16 Sep 2016 04:16:00 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx3v3.cudamail.com (mx3.cudamail.com [64.34.241.5]) by archives.nicira.com (Postfix) with ESMTPS id 9BB6410911 for ; Fri, 16 Sep 2016 04:15:59 -0700 (PDT) Received: from bar6.cudamail.com (localhost [127.0.0.1]) by mx3v3.cudamail.com (Postfix) with ESMTPS id 2C0CC162448 for ; Fri, 16 Sep 2016 05:15:59 -0600 (MDT) X-ASG-Debug-ID: 1474024558-0b323722612b0700001-byXFYA Received: from mx1-pf2.cudamail.com ([192.168.24.2]) by bar6.cudamail.com with ESMTP id 3EBmKdiBjlMQ2TXy (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 16 Sep 2016 05:15:58 -0600 (MDT) X-Barracuda-Envelope-From: bschanmu@redhat.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.24.2 Received: from unknown (HELO mx1.redhat.com) (209.132.183.28) by mx1-pf2.cudamail.com with ESMTPS (DHE-RSA-AES256-SHA encrypted); 16 Sep 2016 11:15:58 -0000 Received-SPF: pass (mx1-pf2.cudamail.com: SPF record at _spf1.redhat.com designates 209.132.183.28 as permitted sender) X-Barracuda-Apparent-Source-IP: 209.132.183.28 X-Barracuda-RBL-IP: 209.132.183.28 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1DEF744BDD for ; Fri, 16 Sep 2016 11:15:57 +0000 (UTC) Received: from localhost.localdomain (ovpn-116-34.phx2.redhat.com [10.3.116.34]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u8GBF9kE024351; Fri, 16 Sep 2016 07:15:55 -0400 X-CudaMail-Envelope-Sender: bschanmu@redhat.com From: bschanmu@redhat.com To: dev@openvswitch.org X-CudaMail-Whitelist-To: dev@openvswitch.org X-CudaMail-MID: CM-E2-915006939 X-CudaMail-DTE: 091616 X-CudaMail-Originating-IP: 209.132.183.28 Date: Fri, 16 Sep 2016 16:45:09 +0530 X-ASG-Orig-Subj: [##CM-E2-915006939##][PATCH v2 4/4] ovn: Add ovndb servers ocf script in debian packager Message-Id: <1474024509-15149-5-git-send-email-bschanmu@redhat.com> In-Reply-To: <1474024509-15149-1-git-send-email-bschanmu@redhat.com> References: <1474024509-15149-1-git-send-email-bschanmu@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 16 Sep 2016 11:15:57 +0000 (UTC) X-Barracuda-Connect: UNKNOWN[192.168.24.2] X-Barracuda-Start-Time: 1474024558 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-ASG-Whitelist: Header =?UTF-8?B?eFwtY3VkYW1haWxcLXdoaXRlbGlzdFwtdG8=?= X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 Subject: [ovs-dev] [PATCH v2 4/4] ovn: Add ovndb servers ocf script in debian packager X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" From: Babu Shanmugam 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 --- debian/automake.mk | 2 ++ debian/ovn-common.install | 1 + debian/ovn-common.postinst | 24 ++++++++++++++++++++++++ debian/ovn-common.postrm | 23 +++++++++++++++++++++++ 4 files changed, 50 insertions(+) create mode 100644 debian/ovn-common.postinst create mode 100644 debian/ovn-common.postrm diff --git a/debian/automake.mk b/debian/automake.mk index 73b4d00..f793d4f 100644 --- a/debian/automake.mk +++ b/debian/automake.mk @@ -63,6 +63,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 acb1dc9..8b833dc 100644 --- a/debian/ovn-common.install +++ b/debian/ovn-common.install @@ -1,3 +1,4 @@ usr/bin/ovn-nbctl usr/bin/ovn-sbctl 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 0000000..588044f --- /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 0000000..9face72 --- /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