X-Original-To: alpine-aports@mail.alpinelinux.org Delivered-To: alpine-aports@mail.alpinelinux.org Received: from mail.alpinelinux.org (dallas-a1.alpinelinux.org [127.0.0.1]) by mail.alpinelinux.org (Postfix) with ESMTP id 7DB2DDC02FF for ; Tue, 25 Aug 2015 23:06:58 +0000 (UTC) Received: from apollo.thewebhostserver.com (apollomail.thewebhostserver.com [46.23.65.248]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 2E059DC00B8 for ; Tue, 25 Aug 2015 23:06:57 +0000 (UTC) Received: from [90.201.160.30] (port=60319 helo=[192.168.0.17]) by apollo.thewebhostserver.com with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.85) (envelope-from ) id 1ZUNIr-003mA8-53; Wed, 26 Aug 2015 00:06:53 +0100 Reply-To: developer@it-offshore.co.uk Subject: Re: [alpine-aports] [PATCH] main/openvswitch: fix ifupdown script References: <1439851162-53509-1-git-send-email-developer@it-offshore.co.uk> <20150825094747.0471379c@ncopa-desktop.alpinelinux.org> To: Natanael Copa Cc: alpine-aports@lists.alpinelinux.org From: IT Developer X-Enigmail-Draft-Status: N1110 Organization: IT Offshore Message-ID: <55DCF51C.5060201@it-offshore.co.uk> Date: Wed, 26 Aug 2015 00:07:08 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 In-Reply-To: <20150825094747.0471379c@ncopa-desktop.alpinelinux.org> Content-Type: multipart/alternative; boundary="------------080007080104080304050005" X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - apollo.thewebhostserver.com X-AntiAbuse: Original Domain - lists.alpinelinux.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - it-offshore.co.uk X-Get-Message-Sender-Via: apollo.thewebhostserver.com: authenticated_id: developer@it-offshore.co.uk X-Source: X-Source-Args: X-Source-Dir: X-Virus-Scanned: ClamAV using ClamSMTP This is a multi-part message in MIME format. --------------080007080104080304050005 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Adding rc_depends to /etc/conf.d/ovs-vswitchd did not start the depends. Starting init scripts from within a shell script does not start the depends so I revised the ifupdown script to loop through: DEPENDS=3D$(/lib/rc/bin/rc-depend -t ineed -qq ovs-vswitchd) 2 new ovs patches sent a little earlier. Stuart. On 25/08/15 08:47, Natanael Copa wrote: > On Mon, 17 Aug 2015 22:39:22 +0000 > Stuart Cardall wrote: > >> --- a/main/openvswitch/ifupdown.sh >> +++ b/main/openvswitch/ifupdown.sh >> @@ -29,7 +29,9 @@ if (ovs_vsctl --version) > /dev/null 2>&1; then :; e= lse >> exit 0 >> fi >> =20 >> -if /etc/init.d/ovs-vswitchd status > /dev/null 2>&1; then :; else >> +if ! /etc/init.d/ovs-vswitchd status &>/dev/null; then >> + /etc/init.d/ovs-modules start >> + /etc/init.d/ovsdb-server start >> /etc/init.d/ovs-vswitchd start >> fi >> =20 > Why don't we add ovsdb-server and ovs-modules as dependencies for ovs-v= switchd? > > If it is not a hard dependency (but a configurable, soft dependency), > then maybe the /etc/conf.d/ovs-vswitchd should have: > > rc_depend=3D"ovs-modules ovsdb-server" > > I think hardcoding it in the ifupdown.sh script is wrong in case the > dependencies for the ovs-vswitchd service changes in future version. > > > -nc --------------080007080104080304050005 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 8bit Adding rc_depends to /etc/conf.d/ovs-vswitchd did not start the depends.

Starting init scripts from within a shell script does not start the depends so I revised the ifupdown script to loop through:

DEPENDS=$(/lib/rc/bin/rc-depend -t ineed -qq ovs-vswitchd)

2 new ovs patches sent a little earlier.

Stuart.

On 25/08/15 08:47, Natanael Copa wrote:
On Mon, 17 Aug 2015 22:39:22 +0000
Stuart Cardall <developer@it-offshore.co.uk> wrote:

--- a/main/openvswitch/ifupdown.sh
+++ b/main/openvswitch/ifupdown.sh
@@ -29,7 +29,9 @@ if (ovs_vsctl --version) > /dev/null 2>&1; then :; else
     exit 0
 fi
 
-if /etc/init.d/ovs-vswitchd status > /dev/null 2>&1; then :; else
+if ! /etc/init.d/ovs-vswitchd status &>/dev/null; then
+    /etc/init.d/ovs-modules start
+    /etc/init.d/ovsdb-server start
     /etc/init.d/ovs-vswitchd start
 fi
 
Why don't we add ovsdb-server and ovs-modules as dependencies for ovs-vswitchd?

If it is not a hard dependency (but a configurable, soft dependency),
then maybe the /etc/conf.d/ovs-vswitchd should have:

  rc_depend="ovs-modules ovsdb-server"

I think hardcoding it in the ifupdown.sh script is wrong in case the
dependencies for the ovs-vswitchd service changes in future version.


-nc

--------------080007080104080304050005-- --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---