From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Jun 14 12:20:10 2011 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 E441F106566B for ; Tue, 14 Jun 2011 12:20:09 +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 BD3658FC19 for ; Tue, 14 Jun 2011 12:20:09 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p5ECK9Pc033038 for ; Tue, 14 Jun 2011 12:20:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p5ECK9Z2033037; Tue, 14 Jun 2011 12:20:09 GMT (envelope-from gnats) Resent-Date: Tue, 14 Jun 2011 12:20:09 GMT Resent-Message-Id: <201106141220.p5ECK9Z2033037@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, Hiroto Kagotani Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8740106564A for ; Tue, 14 Jun 2011 12:10:39 +0000 (UTC) (envelope-from kagotani@luna3.auto.infsys.cne.okayama-u.ac.jp) Received: from luna3.auto.infsys.cne.okayama-u.ac.jp (luna3.auto.infsys.cne.okayama-u.ac.jp [150.46.6.78]) by mx1.freebsd.org (Postfix) with ESMTP id 70E8E8FC13 for ; Tue, 14 Jun 2011 12:10:38 +0000 (UTC) Received: from luna3.auto.infsys.cne.okayama-u.ac.jp (localhost [127.0.0.1]) by luna3.auto.infsys.cne.okayama-u.ac.jp (8.14.4/8.14.4) with ESMTP id p5ECAbX1068348; Tue, 14 Jun 2011 21:10:37 +0900 (JST) (envelope-from kagotani@luna3.auto.infsys.cne.okayama-u.ac.jp) Received: (from root@localhost) by luna3.auto.infsys.cne.okayama-u.ac.jp (8.14.4/8.14.4/Submit) id p5ECAarm068347; Tue, 14 Jun 2011 21:10:36 +0900 (JST) (envelope-from kagotani) Message-Id: <201106141210.p5ECAarm068347@luna3.auto.infsys.cne.okayama-u.ac.jp> Date: Tue, 14 Jun 2011 21:10:36 +0900 (JST) From: Hiroto Kagotani To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: edwin@mavetju.org Subject: ports/157873: [PATCH] net/dhcprelay: rc.d script does not work 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: Tue, 14 Jun 2011 12:20:10 -0000 >Number: 157873 >Category: ports >Synopsis: [PATCH] net/dhcprelay: rc.d script does not work >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: Tue Jun 14 12:20:09 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Hiroto Kagotani >Release: FreeBSD 8.1-RELEASE i386 >Organization: >Environment: System: FreeBSD myhost.mydomain 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:55:53 UTC 2010 >Description: The rc.d script does not work because of a syntax error. After the error is fixed, no arguments are passed to the command line. The attached sample fix was borrowed from net/dhcprelya. Port maintainer (edwin@mavetju.org) is cc'd. Generated with FreeBSD Port Tools 0.99 >How-To-Repeat: Install net/dhcprelay and add following lines to /etc/rc.conf: dhcprelay_enable="YES" dhcprelay_server="192.168.0.1" # any address dhcprelay_ifaces="em0" # any iface And run: service dhcprelay start Then you get: /usr/local/etc/rc.d/dhcprelay: 25: Syntax error: Unterminated quoted string >Fix: --- dhcprelay-1.2_1.patch begins here --- diff -ruN --exclude=CVS /usr/ports/net/dhcprelay.orig/files/dhcprelay.in /usr/ports/net/dhcprelay/files/dhcprelay.in --- /usr/ports/net/dhcprelay.orig/files/dhcprelay.in 2011-05-15 11:49:09.000000000 +0900 +++ /usr/ports/net/dhcprelay/files/dhcprelay.in 2011-06-14 20:45:22.000000000 +0900 @@ -12,6 +12,13 @@ # dhcprelay_server dhcprelay server(s) # dhcprelay_ifaces ethernet interface(s) +dhcprelay_enable=${dhcprelay_enable:-"NO"} + +dhcprelay_precmd () +{ + rc_flags="${rc_flags} ${dhcprelay_ifaces} ${dhcprelay_server}" +} + . /etc/rc.subr name=dhcprelay @@ -19,12 +26,8 @@ pidfile=/var/run/${name}.pid command=%%PREFIX%%/bin/${name} -command_args="${dhcprelay_ifaces} ${dhcprelay_server}" -# echo $rc_flags +start_precmd=${name}_precmd load_rc_config ${name} - -dhcprelay_enable=${dhcprelay_enable:"NO"} - run_rc_command "$1" --- dhcprelay-1.2_1.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: