[procps] Re: wrong defaults for sysctl on arch linux

  • From: Craig Small <csmall-procps@xxxxxxxxxx>
  • To: procps@xxxxxxxxxxxxx
  • Date: Fri, 20 Sep 2013 21:58:08 +1000

On Fri, Sep 20, 2013 at 11:01:22AM +0200, geralt@xxxxxxxxx wrote:
>    At least when running "sysctl -p" or "sysctl --system", the commands fail
>    because they assume that /etc/sysctl.conf exists, and exit with an error
>    when it is not found.
They are two different options which you behave two different ways.

sysctl -p is used to load in a single file. If you don't specify a file,
then it assumes you mean /etc/sysctl.conf 
This to me is the correct behaviour; if you don't want the default file 
then specify it. 

Now --system is a little different. We're basically saying "config files
could be here, here or here, go find them and use those". One of those
files could be /etc/sysctl.conf
Only the absence of /etc/sysctl.conf causes a problem. This seems a
little odd to me.

So I think a compromise would work.
-p option stays the same
--system doesnt complain and set rc if it doesn't find /etc/sysctl.conf
I'll change it to set rc if it finds nothing.

 - Craig
-- 
Craig Small VK2XLZ   http://enc.com.au/          csmall at : enc.com.au
Debian GNU/Linux     http://www.debian.org/      csmall at : debian.org
GPG fingerprint:     5D2F B320 B825 D939 04D2  0519 3938 F96B DF50 FEA5

Other related posts: