[LEDE-DEV] [PATCH 1/3] busybox: enable flock by default

Mathias Kresin dev at kresin.me
Sun Dec 17 23:58:49 PST 2017


17.12.2017 19:30, Roman Yeryomin:
> This is needed for procd init script protection to work.
> flock adds 4248 bytes to stripped busybox binary.
> 
> Signed-off-by: Roman Yeryomin <roman at advem.lv>
> ---
>   package/utils/busybox/Config-defaults.in | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/package/utils/busybox/Config-defaults.in b/package/utils/busybox/Config-defaults.in
> index 2a8d9dd397..6fc5093055 100644
> --- a/package/utils/busybox/Config-defaults.in
> +++ b/package/utils/busybox/Config-defaults.in
> @@ -1497,7 +1497,7 @@ config BUSYBOX_DEFAULT_FINDFS
>   	default n
>   config BUSYBOX_DEFAULT_FLOCK
>   	bool
> -	default n
> +	default y
>   config BUSYBOX_DEFAULT_FDFLUSH
>   	bool
>   	default n
> 

We have a custom (f)lock command in LEDE [0], which is used for example 
during wireless detect.

I only had a brief lock at your patch series, but the existing lock 
command might do the job.

I've no idea why we have a custom lock command instead of using the 
busybox provided flock. But shipping two (f)lock implementations at the 
same time seem to be a waste of flash space.

Mathias

[0] 
https://git.lede-project.org/?p=source.git;a=blob;f=package/utils/busybox/patches/220-add_lock_util.patch;hb=60a39e8f5af7ed710c5c62b131fd9df6519b64e4



More information about the Lede-dev mailing list