Re: svn commit: r244198 - in head: etc/rc.d sbin/sysctl

2012-12-21 Thread Pawel Jakub Dawidek
On Wed, Dec 19, 2012 at 06:59:17PM -0500, Mark Johnston wrote: On Wed, Dec 19, 2012 at 05:21:40PM -0600, Brooks Davis wrote: On Wed, Dec 19, 2012 at 05:58:54PM -0500, Mark Johnston wrote: On Wed, Dec 19, 2012 at 02:02:09PM -0800, Xin Li wrote: -BEGIN PGP SIGNED MESSAGE- Hash:

Re: svn commit: r244198 - in head: etc/rc.d sbin/sysctl

2012-12-19 Thread Andrey Zonov
On 12/14/12 3:32 AM, Xin LI wrote: Author: delphij Date: Thu Dec 13 23:32:47 2012 New Revision: 244198 URL: http://svnweb.freebsd.org/changeset/base/244198 Log: Teach sysctl(8) about parsing a file (while I'm there also give it capability of parsing both = and : formats).

Re: svn commit: r244198 - in head: etc/rc.d sbin/sysctl

2012-12-19 Thread Ian Lepore
On Wed, 2012-12-19 at 19:02 +0400, Andrey Zonov wrote: On 12/14/12 3:32 AM, Xin LI wrote: Author: delphij Date: Thu Dec 13 23:32:47 2012 New Revision: 244198 URL: http://svnweb.freebsd.org/changeset/base/244198 Log: Teach sysctl(8) about parsing a file (while I'm there also give

Re: svn commit: r244198 - in head: etc/rc.d sbin/sysctl

2012-12-19 Thread Alfred Perlstein
Wouldn't this obfuscate any errors in files? Sent from my iPhone On Dec 19, 2012, at 7:37 AM, Ian Lepore free...@damnhippie.dyndns.org wrote: On Wed, 2012-12-19 at 19:02 +0400, Andrey Zonov wrote: On 12/14/12 3:32 AM, Xin LI wrote: Author: delphij Date: Thu Dec 13 23:32:47 2012 New

Re: svn commit: r244198 - in head: etc/rc.d sbin/sysctl

2012-12-19 Thread Ian Lepore
Hrm. Yeah, it would. Or at least, it might. If the error message cites the text of the line it chokes on, maybe that's not a problem. Running sysctl once passing it a list of files would fix that, but would probably be more complexity than it's worth. I just always try to find ways to reduce

Re: svn commit: r244198 - in head: etc/rc.d sbin/sysctl

2012-12-19 Thread Alfred Perlstein
I think that it's a good idea. Maybe there's some way to give sysctl.conf the equivalent of #file preprocessor directives? Sent from my iPhone On Dec 19, 2012, at 7:56 AM, Ian Lepore free...@damnhippie.dyndns.org wrote: Hrm. Yeah, it would. Or at least, it might. If the error message

Re: svn commit: r244198 - in head: etc/rc.d sbin/sysctl

2012-12-19 Thread Alfred Perlstein
I didn't catch your idea of multiple files to parse. That sounds like a better idea than mine (# based file directives) for sure. Sent from my iPhone On Dec 19, 2012, at 9:37 AM, Alfred Perlstein bri...@mu.org wrote: I think that it's a good idea. Maybe there's some way to give sysctl.conf

Re: svn commit: r244198 - in head: etc/rc.d sbin/sysctl

2012-12-19 Thread Xin Li
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 12/19/12 09:37, Alfred Perlstein wrote: I think that it's a good idea. Maybe there's some way to give sysctl.conf the equivalent of #file preprocessor directives? /me seeing sysctl(8) expanding to grow e-mail reading capability in the future?

Re: svn commit: r244198 - in head: etc/rc.d sbin/sysctl

2012-12-19 Thread Garrett Cooper
On Wed, Dec 19, 2012 at 7:37 AM, Ian Lepore free...@damnhippie.dyndns.org wrote: ... Instead of running sysctl a bunch of times, how about something conceptually similar to cat /etc/sysctl.d/* /etc/sysctl.conf | sysctl -f - Along with this (untested) patch to make sysctl understand -f

Re: svn commit: r244198 - in head: etc/rc.d sbin/sysctl

2012-12-19 Thread Ian Lepore
On Wed, 2012-12-19 at 11:10 -0800, Garrett Cooper wrote: On Wed, Dec 19, 2012 at 7:37 AM, Ian Lepore free...@damnhippie.dyndns.org wrote: ... Instead of running sysctl a bunch of times, how about something conceptually similar to cat /etc/sysctl.d/* /etc/sysctl.conf | sysctl -f -

Re: svn commit: r244198 - in head: etc/rc.d sbin/sysctl

2012-12-19 Thread Chris Rees
On 19 Dec 2012 19:37, Garrett Cooper yaneg...@gmail.com wrote: On Wed, Dec 19, 2012 at 7:37 AM, Ian Lepore free...@damnhippie.dyndns.org wrote: ... Instead of running sysctl a bunch of times, how about something conceptually similar to cat /etc/sysctl.d/* /etc/sysctl.conf | sysctl

Re: svn commit: r244198 - in head: etc/rc.d sbin/sysctl

2012-12-19 Thread Jilles Tjoelker
On Wed, Dec 19, 2012 at 11:16:26AM -0800, Xin Li wrote: It may be worthy to make sysctl(8) to accept mutiple -f's, but it seems to be hard to write shell scripts that utilizes this feature in a elegant manner. This is possible but indeed a bit ugly. Hard-coding the list of files is not too

Re: svn commit: r244198 - in head: etc/rc.d sbin/sysctl

2012-12-19 Thread Garrett Cooper
On Wed, Dec 19, 2012 at 12:14 PM, Chris Rees utis...@gmail.com wrote: On 19 Dec 2012 19:37, Garrett Cooper yaneg...@gmail.com wrote: On Wed, Dec 19, 2012 at 7:37 AM, Ian Lepore free...@damnhippie.dyndns.org wrote: ... Instead of running sysctl a bunch of times, how about something

Re: svn commit: r244198 - in head: etc/rc.d sbin/sysctl

2012-12-19 Thread Garrett Cooper
On Wed, Dec 19, 2012 at 1:04 PM, Jilles Tjoelker jil...@stack.nl wrote: On Wed, Dec 19, 2012 at 11:16:26AM -0800, Xin Li wrote: It may be worthy to make sysctl(8) to accept mutiple -f's, but it seems to be hard to write shell scripts that utilizes this feature in a elegant manner. This is

Re: svn commit: r244198 - in head: etc/rc.d sbin/sysctl

2012-12-19 Thread Garrett Cooper
On Wed, Dec 19, 2012 at 1:10 PM, Garrett Cooper yaneg...@gmail.com wrote: ... find -exec / echo | xargs ? Seems like there's a better way to solve this. Of course we also might be overengineering the problem (my suggestion definitely was overengineered). Why not pass in the appropriate

Re: svn commit: r244198 - in head: etc/rc.d sbin/sysctl

2012-12-19 Thread Xin Li
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 12/19/12 13:10, Garrett Cooper wrote: On Wed, Dec 19, 2012 at 1:04 PM, Jilles Tjoelker jil...@stack.nl wrote: On Wed, Dec 19, 2012 at 11:16:26AM -0800, Xin Li wrote: It may be worthy to make sysctl(8) to accept mutiple -f's, but it seems to

Re: svn commit: r244198 - in head: etc/rc.d sbin/sysctl

2012-12-19 Thread Xin Li
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 12/19/12 13:12, Garrett Cooper wrote: On Wed, Dec 19, 2012 at 1:10 PM, Garrett Cooper yaneg...@gmail.com wrote: ... find -exec / echo | xargs ? Seems like there's a better way to solve this. Of course we also might be overengineering

Re: svn commit: r244198 - in head: etc/rc.d sbin/sysctl

2012-12-19 Thread Xin Li
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 12/19/12 13:08, Garrett Cooper wrote: On Wed, Dec 19, 2012 at 12:14 PM, Chris Rees utis...@gmail.com wrote: On 19 Dec 2012 19:37, Garrett Cooper yaneg...@gmail.com wrote: On Wed, Dec 19, 2012 at 7:37 AM, Ian Lepore

Re: svn commit: r244198 - in head: etc/rc.d sbin/sysctl

2012-12-19 Thread Benjamin Kaduk
[cc trimmed] On Wed, Dec 19, 2012 at 5:02 PM, Xin Li delp...@delphij.net wrote: Irrelevant. Consider this (extreme) situation: someone distributes several sets of sysctl values tuned for certain situations, like tcp.conf, supermicro.conf, ... and wants to put them together in a directory,

Re: svn commit: r244198 - in head: etc/rc.d sbin/sysctl

2012-12-19 Thread Garrett Cooper
On Wed, Dec 19, 2012 at 2:07 PM, Xin Li delp...@delphij.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 12/19/12 13:08, Garrett Cooper wrote: On Wed, Dec 19, 2012 at 12:14 PM, Chris Rees utis...@gmail.com wrote: On 19 Dec 2012 19:37, Garrett Cooper yaneg...@gmail.com wrote:

Re: svn commit: r244198 - in head: etc/rc.d sbin/sysctl

2012-12-19 Thread Xin Li
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 12/19/12 14:28, Benjamin Kaduk wrote: [cc trimmed] On Wed, Dec 19, 2012 at 5:02 PM, Xin Li delp...@delphij.net mailto:delp...@delphij.net wrote: Irrelevant. Consider this (extreme) situation: someone distributes several sets of sysctl

Re: svn commit: r244198 - in head: etc/rc.d sbin/sysctl

2012-12-19 Thread Benjamin Kaduk
On Wed, Dec 19, 2012 at 5:37 PM, Xin Li delp...@delphij.net wrote: Not a direct reply, but just noting that it can be *very* useful to have, e.g., a README or foo.old or foo.disabled file in the same directory where the live configuration files live. Always interpreting the full '*' glob

Re: svn commit: r244198 - in head: etc/rc.d sbin/sysctl

2012-12-19 Thread Mark Johnston
On Wed, Dec 19, 2012 at 02:02:09PM -0800, Xin Li wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 12/19/12 13:12, Garrett Cooper wrote: On Wed, Dec 19, 2012 at 1:10 PM, Garrett Cooper yaneg...@gmail.com wrote: ... find -exec / echo | xargs ? Seems like there's a better

Re: svn commit: r244198 - in head: etc/rc.d sbin/sysctl

2012-12-19 Thread Brooks Davis
On Wed, Dec 19, 2012 at 05:58:54PM -0500, Mark Johnston wrote: On Wed, Dec 19, 2012 at 02:02:09PM -0800, Xin Li wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 12/19/12 13:12, Garrett Cooper wrote: On Wed, Dec 19, 2012 at 1:10 PM, Garrett Cooper yaneg...@gmail.com wrote:

Re: svn commit: r244198 - in head: etc/rc.d sbin/sysctl

2012-12-19 Thread Mark Johnston
On Wed, Dec 19, 2012 at 05:21:40PM -0600, Brooks Davis wrote: On Wed, Dec 19, 2012 at 05:58:54PM -0500, Mark Johnston wrote: On Wed, Dec 19, 2012 at 02:02:09PM -0800, Xin Li wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 12/19/12 13:12, Garrett Cooper wrote: On Wed,

Re: svn commit: r244198 - in head: etc/rc.d sbin/sysctl

2012-12-19 Thread Brooks Davis
On Wed, Dec 19, 2012 at 06:59:17PM -0500, Mark Johnston wrote: On Wed, Dec 19, 2012 at 05:21:40PM -0600, Brooks Davis wrote: On Wed, Dec 19, 2012 at 05:58:54PM -0500, Mark Johnston wrote: On Wed, Dec 19, 2012 at 02:02:09PM -0800, Xin Li wrote: -BEGIN PGP SIGNED MESSAGE- Hash:

Re: svn commit: r244198 - in head: etc/rc.d sbin/sysctl

2012-12-17 Thread Jilles Tjoelker
On Thu, Dec 13, 2012 at 11:32:48PM +, Xin LI wrote: Author: delphij Date: Thu Dec 13 23:32:47 2012 New Revision: 244198 URL: http://svnweb.freebsd.org/changeset/base/244198 Log: Teach sysctl(8) about parsing a file (while I'm there also give it capability of parsing both = and :