From owner-freebsd-ports@freebsd.org Thu Aug 10 15:46:21 2017 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 454F7DD6484 for ; Thu, 10 Aug 2017 15:46:21 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [IPv6:2001:8b0:151:1:c4ea:bd49:619b:6cb3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.infracaninophile.co.uk", Issuer "infracaninophile.co.uk" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id CA93166433 for ; Thu, 10 Aug 2017 15:46:20 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from liminal.local (unknown [IPv6:2001:8b0:151:1:1c1d:86a1:a200:b700]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: m.seaman@infracaninophile.co.uk) by smtp.infracaninophile.co.uk (Postfix) with ESMTPSA id 61B8090B2 for ; Thu, 10 Aug 2017 15:46:18 +0000 (UTC) Authentication-Results: smtp.infracaninophile.co.uk; dmarc=none header.from=FreeBSD.org Authentication-Results: smtp.infracaninophile.co.uk/61B8090B2; dkim=none; dkim-atps=neutral Subject: Re: FreeBSD Port: haproxy-1.7.8 To: freebsd-ports@freebsd.org References: <01ae2c2e-4d1f-df7d-b7c7-8b9677ce961e@inbox.ru> From: Matthew Seaman Message-ID: Date: Thu, 10 Aug 2017 16:46:17 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <01ae2c2e-4d1f-df7d-b7c7-8b9677ce961e@inbox.ru> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="WegiD1PPPA5GXGXXoj4xjxk3cexNdt6Ta" X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Aug 2017 15:46:21 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --WegiD1PPPA5GXGXXoj4xjxk3cexNdt6Ta Content-Type: multipart/mixed; boundary="8XUX2cwEpRKeVXgWbXmvFMSAGqDIPQJoO"; protected-headers="v1" From: Matthew Seaman To: freebsd-ports@freebsd.org Message-ID: Subject: Re: FreeBSD Port: haproxy-1.7.8 References: <01ae2c2e-4d1f-df7d-b7c7-8b9677ce961e@inbox.ru> In-Reply-To: <01ae2c2e-4d1f-df7d-b7c7-8b9677ce961e@inbox.ru> --8XUX2cwEpRKeVXgWbXmvFMSAGqDIPQJoO Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: quoted-printable On 10/08/2017 15:29, Alan Makoev via freebsd-ports wrote: > Hello FreeBSD team! > I installed haproxy and found that it's rc script ignores pidfile set i= n > rc.d. I suppose this is because these lines: >=20 > : ${haproxy_enable:=3D"NO"} > : ${haproxy_config:=3D"%%PREFIX%%/etc/${name}.conf"} > pidfile=3D${haproxy_pidfile:-"/var/run/haproxy.pid"} >=20 > precede this one: >=20 > load_rc_config $name >=20 > As a result, haproxy_enable and haproxy_config are redefined when > loading config, but pidfile keeps the default value. No, this is a common shell idiom for providing a default value ${foo:-"default setting"} will resolve to either the value of ${foo} or -- iff ${foo} is unset or null -- then "default setting" will be used instead. The form: : ${foo:=3D"default setting"} is similar, but difference is that it /sets/ the value of ${foo} to "default setting" if ${foo} is not already initialised. The leading ':' is a do-nothing command in /bin/sh -- otherwise the shell would attempt to run whatever setting ${foo} ended up with as a command, which would undoubtedly fail. These are used without exception in every single rc.conf init file, so we're pretty sure it works exactly as intended. You need to put text like this haproxy_pidfile=3D"/some/pidfile/location" into your /etc/rc.conf Note that, depending on the software concerned, having a pidfile defined in the haproxy.conf file may or may not override a setting given on the command line by the rc.conf script, so make sure both of those are in agreement to avoid confusion. Cheers, Matthew --8XUX2cwEpRKeVXgWbXmvFMSAGqDIPQJoO-- --WegiD1PPPA5GXGXXoj4xjxk3cexNdt6Ta Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQJ8BAEBCgBmBQJZjH/KXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NTNBNjhCOTEzQTRFNkNGM0UxRTEzMjZC QjIzQUY1MThFMUE0MDEzAAoJELsjr1GOGkATVN0P/2PKNrei1ccsqqvxyC8Wf1S2 tbbd/HgfskkCjJGPZUS0NhOv4ZrOQaSh5FaOT6r5o1+6YjqKq0YdzV8nolhYUi7r wf5VQVLhdDvqc26WUic+8ou3YogHopIMPuJeCVnPKV5Doek6NkG83YDy/Fs3sYd8 qrhrqDZaq3V38s03YdPgiQheWZXuqKYiWfiBvrjVSsuLWNEg5Y/akNffgkM1w6OG ckeJiKXu1Uurd4ZJa9ED2WLz5snxrx0c9Z/xtav5Vt4eMY1BTNowojRngrpTAypD TG4TPK13OVv/qDYwYqNChkhSLCGu16SXt+KYsAI8r2hYiqfnz5cTWM26lAZBX0JS v6S/pwW/QoQrevstw6vvF4eUP/poB+Yek8N9Mfu4Lu4T9U9oTu0XMbA47lUjBm/n H3gkXvcgaqtJ2UqSmZY2e975BPjw/xu1lstidVyNYGOLiuDHlutTd6clbZTHlhPH U1yyW8TD9V9KIRpes//GMtq/EJtQwF4qPQ6PY72RazFS7wjvptXfUyvVPn/xECrC wr3ucedj7ahV7qv39vU0wEHJqQaccVXTRPdD4BUYy3UjWer+Ayp+SnltvQeC0eed S+bimo1P6Us9p/AxH37mmloC7V9dNCA40oaQJF+zp8Xpt+pEmtlw6pHmUawn1w9+ XXyXrllAjCFqSPSfwtjQ =sHLW -----END PGP SIGNATURE----- --WegiD1PPPA5GXGXXoj4xjxk3cexNdt6Ta--