From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Jan 22 16:00:10 2010 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 BF473106566B for ; Fri, 22 Jan 2010 16:00:10 +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 837E68FC0A for ; Fri, 22 Jan 2010 16:00:10 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MG0Axl012575 for ; Fri, 22 Jan 2010 16:00:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id o0MG0AIS012574; Fri, 22 Jan 2010 16:00:10 GMT (envelope-from gnats) Resent-Date: Fri, 22 Jan 2010 16:00:10 GMT Resent-Message-Id: <201001221600.o0MG0AIS012574@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, Emil Smolenski Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C8F11065676 for ; Fri, 22 Jan 2010 15:54:58 +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 3C7D88FC19 for ; Fri, 22 Jan 2010 15:54:58 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MFswk3018758 for ; Fri, 22 Jan 2010 15:54:58 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id o0MFsvaa018736; Fri, 22 Jan 2010 15:54:57 GMT (envelope-from nobody) Message-Id: <201001221554.o0MFsvaa018736@www.freebsd.org> Date: Fri, 22 Jan 2010 15:54:57 GMT From: Emil Smolenski To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/143086: [PATCH] net/quagga rc script always returns status 0 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: Fri, 22 Jan 2010 16:00:10 -0000 >Number: 143086 >Category: ports >Synopsis: [PATCH] net/quagga rc script always returns status 0 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Jan 22 16:00:09 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Emil Smolenski >Release: FreeBSD 8.0-STABLE >Organization: >Environment: FreeBSD 8.0-STABLE i386 >Description: /usr/local/etc/rc.d/quagga script always returns 0, regardless of actual status of quagga daemons. It should return non-zero when one or more of quagga daemons don't work. This bug breaks applications such as heartbeat which depend on the onestatus command. >How-To-Repeat: # /usr/local/etc/rc.d/quagga onestatus zebra is not running. bgpd is not running. # echo $? 0 >Fix: Apply the attached patch. Patch attached with submission follows: diff -ruN quagga.bak/files/quagga.sh.in quagga/files/quagga.sh.in --- quagga.bak/files/quagga.sh.in 2009-12-14 17:40:52.000000000 +0100 +++ quagga/files/quagga.sh.in 2010-01-20 11:34:22.000000000 +0100 @@ -54,6 +54,8 @@ do_cmd() { + local ret + ret=0 for daemon in ${quagga_daemons}; do command=%%PREFIX%%/sbin/${daemon} required_files=%%SYSCONF_DIR%%/${daemon}.conf @@ -66,9 +68,10 @@ fi eval flags=\$\{${daemon}_flags:-\"${quagga_flags}\"\} name=${daemon} - run_rc_command "$1" _rc_restart_done=false + run_rc_command "$1" || ret=1 done + return ${ret} } # set defaults >Release-Note: >Audit-Trail: >Unformatted: