From owner-freebsd-hackers@FreeBSD.ORG Wed May 9 16:05:59 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 594F81065670 for ; Wed, 9 May 2012 16:05:59 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 2D35B8FC0C for ; Wed, 9 May 2012 16:05:59 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so825452pbb.13 for ; Wed, 09 May 2012 09:05:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:from:content-type:x-mailer:message-id:date:to :content-transfer-encoding:mime-version; bh=wORIPEOIv+U6E2zzyrfEpiuqDh3pqs1I84m557XU0Ks=; b=Ede0zzo/FZv23lBA6hR9UQVcy/I/FYFvYidP9YJlHaw8R0ONvT/XXZz8ETw8iZBWO+ wU2otA2R/uCuQqn1O9Bq0WXi+/4bDM6Nqm2pjrX9O89pkGUcxImb+shjx2ohnUtu4LfT nmQaVeX7GlgW2MOEgCQF+y0N1HNfZjzTGNgA8DSw8UASWM2n+T4KIHW5BT4niHkKC4Kz 1W3nos6/gvNXwGq4cqoWBdKd27BbsKdmD4iRq2mii5kwjLiZQSwbQ+Bqjnob4/1KoY8G rIdcBlR6EANpnQbMMmgDZ5zVgy2BvkoUZb4+rch2SkISs+yfBY0m2YuS4qYHOS8LFBan G23w== Received: by 10.68.191.230 with SMTP id hb6mr10569747pbc.167.1336579553360; Wed, 09 May 2012 09:05:53 -0700 (PDT) Received: from [10.6.137.181] (mobile-166-147-080-052.mycingular.net. [166.147.80.52]) by mx.google.com with ESMTPS id vc4sm948275pbc.8.2012.05.09.09.05.50 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 09 May 2012 09:05:52 -0700 (PDT) From: Garrett Cooper Content-Type: text/plain; charset=us-ascii X-Mailer: iPhone Mail (9B179) Message-Id: Date: Wed, 9 May 2012 09:05:47 -0700 To: "hackers@FreeBSD.org" Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (1.0) Cc: Subject: Thoughts about kenv emulating sysctl X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 May 2012 16:05:59 -0000 Hi Hackers, I've been asked to write up a script to analyze tunables via kenv for ar= chival purposes an to establish a baseline set of static variables. In order to make life easier (and be able to do all the grunt work in a s= hell one-liner instead of introducing a bug prone tunable parser) I have wri= tten up a patch which would make kenv function a bit more like sysctl, wrt t= he fact that sysctl -n suppresses suffixing a value with the variable name w= hen executed like so: # kenv LINES LINES=3D"24" # kenv -n LINES 24 I've also considered keeping the functional defaults and instead do the f= ollowing... # kenv -v LINES LINES=3D"24" # kenv LINES 24 Pro of the first form is that it matches sysctl, pro of the second form i= s that it doesn't break backwards 'compatibility'. I know kenv isn't a widely used utility (albeit, I have seen it used in a= few spots outside of FreeBSD proper), but I was wondering if anyone could s= ee any potential pitfalls or would have a large degree of heartburn over cha= nging the default to match sysctl. Thanks! -Garrett=