From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Aug 1 15:50:02 2009 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E4211065673 for ; Sat, 1 Aug 2009 15:50:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 18F9C8FC25 for ; Sat, 1 Aug 2009 15:50:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n71Fo14g057758 for ; Sat, 1 Aug 2009 15:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n71Fo1Rp057757; Sat, 1 Aug 2009 15:50:01 GMT (envelope-from gnats) Resent-Date: Sat, 1 Aug 2009 15:50:01 GMT Resent-Message-Id: <200908011550.n71Fo1Rp057757@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Hans Hoppe Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69A0B106566B for ; Sat, 1 Aug 2009 15:46:36 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 575A18FC08 for ; Sat, 1 Aug 2009 15:46:36 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n71FkaxW099715 for ; Sat, 1 Aug 2009 15:46:36 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id n71FkaRY099714; Sat, 1 Aug 2009 15:46:36 GMT (envelope-from nobody) Message-Id: <200908011546.n71FkaRY099714@www.freebsd.org> Date: Sat, 1 Aug 2009 15:46:36 GMT From: Hans Hoppe To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/137335: net/balance rc.d script should not force binding to a single interface X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Aug 2009 15:50:02 -0000 >Number: 137335 >Category: ports >Synopsis: net/balance rc.d script should not force binding to a single interface >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Aug 01 15:50:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Hans Hoppe >Release: RELENG_7; ports-all tag=. >Organization: >Environment: n.a. >Description: The net/balance rc.d script has the -b flag to balance hardcoded. This forces balance to bind to a single interface. Use of balance_*_address and the -b flag should be optional. >How-To-Repeat: >Fix: The attached patch for balance.sh.in makes using balance_*_address optional. Patch attached with submission follows: --- balance.sh.in.orig 2008-11-01 13:34:48.000000000 +0100 +++ balance.sh.in 2009-08-01 16:43:59.000000000 +0200 @@ -38,8 +38,11 @@ eval flags=\"\${balance_${host}_flags}\" eval address=\"\${balance_${host}_address}\" eval targets=\"\${balance_${host}_targets}\" + if [ "" != "${address}" ]; then + flags="${flags} -b ${address}" + fi for port in ${ports}; do - "${command}" ${flags} -b ${address} ${port} ${targets} + "${command}" ${flags} ${port} ${targets} done done fi @@ -51,9 +54,15 @@ for host in ${balance_hosts}; do eval ports=\"\${balance_${host}_ports}\" eval address=\"\${balance_${host}_address}\" + flags="" + if [ "" != "${address}" ]; then + flags="-b ${address}" + else + address='*' + fi for port in ${ports}; do echo "balance at ${address}:${port}" - "${command}" -b ${address} -c kill ${port} + "${command}" ${flags} -c kill ${port} done done fi @@ -65,9 +74,15 @@ for host in ${balance_hosts}; do eval ports=\"\${balance_${host}_ports}\" eval address=\"\${balance_${host}_address}\" + flags="" + if [ "" != "${address}" ]; then + flags="-b ${address}" + else + address='*' + fi for port in ${ports}; do echo "balance at ${address}:${port}" - "${command}" -b ${address} -c show ${port} + "${command}" ${flags} -c show ${port} done done fi >Release-Note: >Audit-Trail: >Unformatted: