From owner-freebsd-current@FreeBSD.ORG Sun Dec 2 04:43:23 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CA43EBA5 for ; Sun, 2 Dec 2012 04:43:23 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 86E888FC0C for ; Sun, 2 Dec 2012 04:43:23 +0000 (UTC) Received: by mail-ob0-f182.google.com with SMTP id 16so1999918obc.13 for ; Sat, 01 Dec 2012 20:43:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=FjjU0LNtiM2NNLY/Y6UxwJ3KDPFucsmLGcRESZi11fs=; b=Z/gEIAHHEkE71VWExpj8Fo68YvtRnvd0aVqwuFOs5ttBwjsAP0PlDCUz0Qis5WbiOk 6nTfVqZMN0iR0n9tkPr81nMVzkmpzPuX0qXX2Kj0GBkrltT/WMT6MKuFMSgGmG0rrspr c2y+I/3PGBJmGFCWXK2XczYp1yrEgyAiNpXkurYwEZkOGqogw3/tNssbhafTJSlQ2hOt l9v/tJdVvbF8ZgNqgoiSSubQMo7VzvyVBgvyISVCZQsOUKW3m5UYpXmjelhLRtmEIT1O T+UwyRbuiNqFjofVmZsMyQgS4HfFmIi0k2eV2V90XL0QAUX8w/dewjCCa1LPhbFhEnUk wKNg== MIME-Version: 1.0 Received: by 10.182.146.107 with SMTP id tb11mr1385486obb.30.1354423396928; Sat, 01 Dec 2012 20:43:16 -0800 (PST) Received: by 10.76.143.33 with HTTP; Sat, 1 Dec 2012 20:43:16 -0800 (PST) In-Reply-To: <50BAD872.2070107@mu.org> References: <20121202.015048.1122480556487090170.hrs@allbsd.org> <50BAD796.5050507@mu.org> <50BAD872.2070107@mu.org> Date: Sat, 1 Dec 2012 20:43:16 -0800 Message-ID: Subject: Re: RFC: sysctl -f filename From: Garrett Cooper To: Alfred Perlstein Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-current@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Dec 2012 04:43:24 -0000 On Sat, Dec 1, 2012 at 8:26 PM, Alfred Perlstein wrote: > On 12/1/12 8:22 PM, Alfred Perlstein wrote: >> >> Does sysctl(8) really need to learn to parse files? >> >> Can't rc.d/sysctl be modified to do the fixup? >> >> This regex seems to work: >> val=`echo $val | sed -e "s@ *\"\(.*\)\" *@\1@" -e "s@ *'\(.*\)' *@\1@"` > > > Upon catching up with emails and seeing netbsd's code, I want to say I don't > feel that strongly about this, although I do wonder how the patch handles > trailing whitespace since I wasn't able to test it: > > example: > "kern.foo='bar'...." > replace the "...." with spaces. It trims them. -Garrett