[arch-projects] [initscripts][PATCH] arch-sysctl: suppress errors about unknown keys

Tom Gundersen teg at jklm.no
Tue Dec 13 14:48:20 EST 2011

On Tue, Dec 13, 2011 at 8:09 PM, lolilolicon <lolilolicon at gmail.com> wrote:
> On Wed, Dec 14, 2011 at 2:26 AM, Tom Gundersen <teg at jklm.no> wrote:
>> Thanks for the patch. However, I don't think this is what we want. As
>> a general rule we don't hide any error/warning messages from the user.
>> It might be that the user does not care, but it might also be that
>> s/he misspelled the name of the key, or that there is some other error
>> where action needs to be taken.
> According to sysctl(8), the -e option is used to "ignore errors about
> unknown keys", so no "other error" would be hidden by it.

Many reasons for "unknown keys", maybe the module is no longer
installed (by mistake), or it failed loading, or, ....

> It's a good thing if we can report error on misspelled keys, but only if
> we don't report the same errors when the keys are just unknown due to
> disabled modules.

I can't imagine how that could be done...

> Currently I have IPv6 disabled, so I get in boot
> messages:
>    error: "net.ipv6.conf.all.use_tempaddr" is an unknown key
>    error: "net.ipv6.conf.default.use_tempaddr" is an unknown key

To me it makes most sense to disable the sysctl entries if you disable
the modules, anything else should give errors.

> Now if I consistently get these errors, it would be very likely for me to
> ignore some other real errors, like misspelling:
>    error: "net.ipv9.conf.default.use_tempaddr" is an unknown key

With your patch this error would be ignored anyway...

> BTW, pre arch-sysctl, it used to be `sysctl -q -p &>/dev/null`, which
> really hides *all* errors;

Yeah, we are slowly moving away from ignoring errors wherever we can.

>  in contrast, The -e option sounds far more
> reasonable...

Sure, but it still risks ignoring some real errors, which is worse
than being annoying.

>>> Signed-off-by: lolilolicon <lolilolicon at gmail.com>
>> Signed-off-by without your real name doesn't really mean anything btw...
> This is the name I go by in the Arch community, a pretty honest fake name
> that you can trust.  If you prefer, I will get rid of the Signed-off-by :)

As you wish, we are not strict on these things.


More information about the arch-projects mailing list