RFC: sysctl -f filename

Garrett Cooper yanegomi at gmail.com
Sun Dec 2 04:43:24 UTC 2012


On Sat, Dec 1, 2012 at 8:26 PM, Alfred Perlstein <bright at mu.org> wrote:
> On 12/1/12 8:22 PM, Alfred Perlstein wrote:
>>
>> Does sysctl(8) really need to learn to parse files?
>>
>> Can't rc.d/sysctl be modified to do the fixup?
>>
>> This regex seems to work:
>> val=`echo $val | sed -e "s@ *\"\(.*\)\" *@\1@" -e "s@ *'\(.*\)' *@\1@"`
>
>
> Upon catching up with emails and seeing netbsd's code, I want to say I don't
> feel that strongly about this, although I do wonder how the patch handles
> trailing whitespace since I wasn't able to test it:
>
> example:
> "kern.foo='bar'...."
> replace the "...." with spaces.

It trims them.
-Garrett


More information about the freebsd-current mailing list