[Buildroot] [PATCH 2/2] package/busybox: add init script for sysctl

Carlos Santos casantos at datacom.com.br
Wed Dec 19 09:58:36 UTC 2018


> From: "Carlos Santos" <casantos at datacom.com.br>
> To: "Nicolas Cavallari" <Nicolas.Cavallari at green-communications.fr>
> Cc: "DATACOM" <rodrigo.rebello at datacom.com.br>, "ratbert90" <aduskett at gmail.com>, "buildroot" <buildroot at buildroot.org>
> Sent: Terça-feira, 18 de dezembro de 2018 15:19:49
> Subject: Re: [Buildroot] [PATCH 2/2] package/busybox: add init script for sysctl

>> From: "Nicolas Cavallari" <Nicolas.Cavallari at green-communications.fr>
>> To: "Carlos Santos" <casantos at datacom.com.br>, "buildroot"
>> <buildroot at buildroot.org>
>> Cc: "ratbert90" <aduskett at gmail.com>, "DATACOM" <rodrigo.rebello at datacom.com.br>
>> Sent: Terça-feira, 18 de dezembro de 2018 14:32:18
>> Subject: Re: [Buildroot] [PATCH 2/2] package/busybox: add init script for sysctl
> 
>> On 18/12/2018 06:02, Carlos Santos wrote:
>>> +	find $SYSCTL_SOURCES -maxdepth 1 -name '*.conf' -print0 2> /dev/null | \
>>> +	xargs -0 -r readlink -f | \
>>> +	{
>>> +		read -r file
>>> +		[ -z "$file" ] || /sbin/sysctl -q -p "$file" $SYSCTL_ARGS || return 1
>>> +	}
>> 
>> So it will only read the first file it finds ?
> 
> The "||" operator means "do the RHS if the LHS is false", so if "$file"
> is empty it doesn't run sysctl; otherwise if syscl fails (which currently
> never happens due to a bug in Busybox) it returns from the function.

Dooh, you were right. There should be a while there, so it is reading
only the first file name. I will fix this and send a new patch.

Thanks

-- 
Carlos Santos (Casantos) - DATACOM, P&D


More information about the buildroot mailing list