From owner-freebsd-hackers@FreeBSD.ORG Wed May 9 22:03:05 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A1D09106564A for ; Wed, 9 May 2012 22:03:05 +0000 (UTC) (envelope-from ray@ddteam.net) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 2E8458FC19 for ; Wed, 9 May 2012 22:03:05 +0000 (UTC) Received: by wgbds11 with SMTP id ds11so802710wgb.31 for ; Wed, 09 May 2012 15:03:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding :x-gm-message-state; bh=fEXnHao1fvUxi20ntC5XSdIzejj/FXeq+LGxwP3T4fs=; b=dS/sBsFCeZA4Miyb9D4Evn5bJjJX50lYvnGujjrWDs/+NkOdoGqyzmq6uOLaC2liYO Kn+bln24yqlE0mYKxLtGKixQz5vjohNnOloANT4XEnYObiR+DpTEO1g04WJHqqicTQao 04U32IiJu1pKEJrphupH0Xx9+2Ra75neKx2P+HesRuTLQFd/7jjwVvBAGgAdH7/5HYtu QPHZqBezWKzwq7tUiVdFvHupUTTtn0aeFelzX0q8wB6i3fUwHB0JddQjoiE5wbniJT4X pWdPe30NEHOT5qmUV5lx5UkIQWBq+zjBOf4ohn50KCzyFwqW9nldxS8EUbi02NGKSMdU Rq0g== Received: by 10.216.201.150 with SMTP id b22mr118446weo.103.1336600983993; Wed, 09 May 2012 15:03:03 -0700 (PDT) Received: from rnote.ddteam.net (157-86-133-95.pool.ukrtel.net. [95.133.86.157]) by mx.google.com with ESMTPS id ex2sm13967491wib.8.2012.05.09.15.03.01 (version=SSLv3 cipher=OTHER); Wed, 09 May 2012 15:03:01 -0700 (PDT) Date: Thu, 10 May 2012 01:02:58 +0300 From: Aleksandr Rybalko To: Garrett Cooper Message-Id: <20120510010258.2653aeea.ray@ddteam.net> In-Reply-To: References: X-Mailer: Sylpheed 3.1.2 (GTK+ 2.24.5; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQkMaj5h3WC8y1MbxCj5JozlWndq6q3SELaSSRT79jWmxnzIzLEfi5vDY4AhAPb0YQNbFlAx Cc: "hackers@FreeBSD.org" Subject: Re: 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 22:03:05 -0000 On Wed, 9 May 2012 09:05:47 -0700 Garrett Cooper wrote: > Hi Hackers, > I've been asked to write up a script to analyze tunables via kenv > for archival 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 shell one-liner instead of introducing a bug prone > tunable parser) I have written up a patch which would make kenv > function a bit more like sysctl, wrt the fact that sysctl -n > suppresses suffixing a value with the variable name when executed > like so: > > # kenv LINES > LINES="24" > # kenv -n LINES > 24 > > I've also considered keeping the functional defaults and instead > do the following... > > # kenv -v LINES > LINES="24" > # kenv LINES > 24 > > Pro of the first form is that it matches sysctl, pro of the > second form is 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 see any potential pitfalls or would have a large degree of > heartburn over changing the default to match sysctl. Thanks! > -Garrett_______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To > unsubscribe, send any mail to > "freebsd-hackers-unsubscribe@freebsd.org" Hi Garret, I use it for embedded, kenv is good transport shared by loader, kernel and userland (since there is no RW storages). IMO, kenv != sysctl, so we not need to match sysctl. But backwards 'compatibility' is good reason to select second way. Thanks. WWW -- Aleksandr Rybalko