From owner-freebsd-bugs@FreeBSD.ORG Thu Mar 27 12:20:11 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 29B2A37B401 for ; Thu, 27 Mar 2003 12:20:11 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 373FB43FB1 for ; Thu, 27 Mar 2003 12:20:09 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id h2RKK9NS081109 for ; Thu, 27 Mar 2003 12:20:09 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id h2RKK9Un081108; Thu, 27 Mar 2003 12:20:09 -0800 (PST) Resent-Date: Thu, 27 Mar 2003 12:20:09 -0800 (PST) Resent-Message-Id: <200303272020.h2RKK9Un081108@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, Chris Rodgers Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 48C3837B405 for ; Thu, 27 Mar 2003 12:11:19 -0800 (PST) Received: from stu172.sjc.ox.ac.uk (stu172.sjc.ox.ac.uk [129.67.62.172]) by mx1.FreeBSD.org (Postfix) with ESMTP id F3F2043FA3 for ; Thu, 27 Mar 2003 12:11:17 -0800 (PST) (envelope-from chris@stu172.sjc.ox.ac.uk) Received: from stu172.sjc.ox.ac.uk (localhost [127.0.0.1]) by stu172.sjc.ox.ac.uk (8.12.6/8.12.6) with ESMTP id h2RKAGkW001226; Thu, 27 Mar 2003 20:10:16 GMT (envelope-from chris@stu172.sjc.ox.ac.uk) Received: (from root@localhost) by stu172.sjc.ox.ac.uk (8.12.6/8.12.6/Submit) id h2RKAFAD001225; Thu, 27 Mar 2003 20:10:15 GMT Message-Id: <200303272010.h2RKAFAD001225@stu172.sjc.ox.ac.uk> Date: Thu, 27 Mar 2003 20:10:15 GMT From: Chris Rodgers To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 X-Spam-Status: No, hits=-3.7 required=5.0 tests=PATCH_CONTEXT_DIFF,RESENT_TO autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) cc: Chris Rodgers Subject: bin/50365: [PATCH] rc.sysctl cannot handle values containing spaces X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Chris Rodgers List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Mar 2003 20:20:12 -0000 >Number: 50365 >Category: bin >Synopsis: [PATCH] rc.sysctl cannot handle values containing spaces >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Mar 27 12:20:08 PST 2003 >Closed-Date: >Last-Modified: >Originator: Chris Rodgers >Release: FreeBSD 5.0-RELEASE i386 >Organization: >Environment: System: FreeBSD stu172.sjc.ox.ac.uk 5.0-RELEASE FreeBSD 5.0-RELEASE #0: Thu Jan 16 22:16:53 GMT 2003 root@hollin.btc.adaptec.com:/usr/obj/usr/src/sys/GENERIC i386 >Description: The /etc/rc.sysctl script cannot handle sysctl values containing spaces (such as net.link.ether.bridge_cfg). Wrapped the whole assignment in quotes to make this work. Added a note to the man page explaining how spaces are to be quoted. >How-To-Repeat: Attempt to put an entry in /etc/sysctl.conf for a value containing a space. It is mangled by the rc.sysctl script. >Fix: The following patch seems to work for me. This is my first FreeBSD PR, so it should probably be checked. I don't know whether there are other places which also need fixing. --- rc.sysctl.diff begins here --- *** /etc/rc.sysctl Thu Jan 16 20:30:28 2003 --- rc.sysctl Thu Mar 27 19:47:22 2003 *************** *** 45,51 **** case ${current_value} in ${val}) ;; *) ! sysctl ${var} ;; esac else --- 45,51 ---- case ${current_value} in ${val}) ;; *) ! sysctl "${var}" ;; esac else --- rc.sysctl.diff ends here --- --- sysctl.conf.5.diff begins here --- *** sysctl.conf.5 Thu Mar 27 19:53:26 2003 --- sysctl.conf.5.new Thu Mar 27 19:55:17 2003 *************** *** 43,49 **** sysctl_mib=value .Ed .Pp ! Comments are denoted by a .Dq # at the beginning of a line. Comments can also exist at the end of a line, as seen in the --- 43,50 ---- sysctl_mib=value .Ed .Pp ! Spaces must be escaped with a backslash. Do not enclose the value in ! quotation marks. Comments are denoted by a .Dq # at the beginning of a line. Comments can also exist at the end of a line, as seen in the --- sysctl.conf.5.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: