From patchwork Mon Jun 26 11:05:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gurucharan Shetty X-Patchwork-Id: 780872 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wxMdc1WC8z9s76 for ; Tue, 27 Jun 2017 07:29:40 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id A1B4FBA3; Mon, 26 Jun 2017 21:29:08 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 57672B9F for ; Mon, 26 Jun 2017 21:29:06 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pf0-f196.google.com (mail-pf0-f196.google.com [209.85.192.196]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 169D2140 for ; Mon, 26 Jun 2017 21:29:06 +0000 (UTC) Received: by mail-pf0-f196.google.com with SMTP id d5so1848524pfe.1 for ; Mon, 26 Jun 2017 14:29:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=hjZcGMyrSKTP0WRBVy6TUl1juNbdFKaVLnS/ZEKrMOo=; b=RjsD5cB4Ds1buirql2uYordGMaoq3lg696X/0Y5RXjabTH2J7LEY3+e9/j2PgoTmob SBW8c70+Fn0WxaGYAdpmtNJYeJ/d2eMb4jGhpTmkPz8YnGzDAwSfXXJUd1B14gn87qp+ 95zRIn3qq+D32xHR/hfwGJR50rXGulmVu8A9pXWYVHBhXz4biChMXDBmc8VidbEqOWh6 lZpnbHaoluf8yqsyGNJQ2ysuLtT4/Jfn0rbOx6XHenbElTNC8zzDdbS13VcujPtqSc4M w1xRooF/4c3glphEwt5cisrGx9XsNGt5vLWRL5f6qcjKRlfCPEiIzdROnF8jILiHJyaT 3CSQ== X-Gm-Message-State: AKS2vOxkUmDiAKlEmdvOJhYypM+65uZ9UtETGWARrYYhhytFEnsNDVLm Lw+LJhzJ5WFZkcHL X-Received: by 10.84.217.206 with SMTP id d14mr2190025plj.121.1498512545489; Mon, 26 Jun 2017 14:29:05 -0700 (PDT) Received: from ubuntu.eng.vmware.com ([208.91.1.34]) by smtp.gmail.com with ESMTPSA id l4sm1717639pgr.21.2017.06.26.14.29.04 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 26 Jun 2017 14:29:04 -0700 (PDT) From: Gurucharan Shetty To: dev@openvswitch.org Date: Mon, 26 Jun 2017 04:05:14 -0700 Message-Id: <1498475114-6127-2-git-send-email-guru@ovn.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1498475114-6127-1-git-send-email-guru@ovn.org> References: <1498475114-6127-1-git-send-email-guru@ovn.org> X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00, DATE_IN_PAST_06_12, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH 2/2] openvswitch-switch.postinst: Remove upstart files. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org For a while, ubuntu used upstart scripts as an alternative for sysv scripts. For e.g popular releases like ubuntu12.04 and ubuntu14.04 have upstart infrastructure. From Ubuntu16.04, they have moved to systemd. Ubuntu maintainers have a fork of openvswitch packages with upstart scripts. When a user installs openvswitch-switch package on a ubuntu 14.04 with 'apt-get install openvswitch-switch', two upstart files are added to /etc/init directory. Now, when the same user builds debian packages from this repo and then installs them, the older upstart files don't get deleted. What this means is that a command like 'invoke-rc.d openvswitch-switch restart' calls initctl scripts instead of sysv script that this repo provides. In our sysv scripts we have logic to carefully upgrade kernel module and save openflow flows. This breaks the intent of the package from this repo. This commit deletes any stale upstart files that have remained in the system. Signed-off-by: Gurucharan Shetty Acked-by: Ben Pfaff --- debian/openvswitch-switch.postinst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/openvswitch-switch.postinst b/debian/openvswitch-switch.postinst index 126e8fe..37e62b7 100755 --- a/debian/openvswitch-switch.postinst +++ b/debian/openvswitch-switch.postinst @@ -33,6 +33,12 @@ case "$1" in fi done fi + if [ -e "/etc/init/openvswitch-switch.conf" ]; then + rm /etc/init/openvswitch-switch.conf + fi + if [ -e "/etc/init/openvswitch-force-reload-kmod.conf" ]; then + rm /etc/init/openvswitch-force-reload-kmod.conf + fi ;; abort-upgrade|abort-remove|abort-deconfigure)