From owner-freebsd-bugs@FreeBSD.ORG Sun Dec 2 13:20:00 2012 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BD57AC07 for ; Sun, 2 Dec 2012 13:20:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 76A948FC12 for ; Sun, 2 Dec 2012 13:20:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id qB2DK0C5058190 for ; Sun, 2 Dec 2012 13:20:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id qB2DK0EM058189; Sun, 2 Dec 2012 13:20:00 GMT (envelope-from gnats) Resent-Date: Sun, 2 Dec 2012 13:20:00 GMT Resent-Message-Id: <201212021320.qB2DK0EM058189@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "4721@hushmail.com" <4721@hushmail.com> Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 58FF580D for ; Sun, 2 Dec 2012 13:11:03 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 3FB458FC14 for ; Sun, 2 Dec 2012 13:11:03 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.5/8.14.5) with ESMTP id qB2DB2rP015762 for ; Sun, 2 Dec 2012 13:11:02 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id qB2DB2d1015755; Sun, 2 Dec 2012 13:11:02 GMT (envelope-from nobody) Message-Id: <201212021311.qB2DB2d1015755@red.freebsd.org> Date: Sun, 2 Dec 2012 13:11:02 GMT From: "4721@hushmail.com" <4721@hushmail.com> To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: conf/174053: [patch] fix etc/rc.d/sysctl to work with values that contain spaces X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Dec 2012 13:20:00 -0000 >Number: 174053 >Category: conf >Synopsis: [patch] fix etc/rc.d/sysctl to work with values that contain spaces >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Dec 02 13:20:00 UTC 2012 >Closed-Date: >Last-Modified: >Originator: 4721@hushmail.com >Release: >Organization: >Environment: >Description: the etc/rc.d/sysctl script attempts to get the current value of a sysctl and skip setting it if it is already equal to the target value. if the value contains spaces the check fails and that line of sysctl.conf is skipped. adding quotes around the check solves this. example line to test: dev.hdaa.0.nid5_config=as=15\ seq=0\ conn=None >How-To-Repeat: >Fix: Patch attached with submission follows: Index: etc/rc.d/sysctl =================================================================== --- etc/rc.d/sysctl (revision 243646) +++ etc/rc.d/sysctl (working copy) @@ -29,7 +29,7 @@ mib=${var%=*} val=${var#*=} - if current_value=`${SYSCTL} -n ${mib} 2>/dev/null`; then + if current_value=`${SYSCTL} -n "${mib}" 2>/dev/null`; then case ${current_value} in ${val}) ;; >Release-Note: >Audit-Trail: >Unformatted: