[LEDE-DEV] [PATCH 1/3] busybox: enable flock by default
Roman Yeryomin
roman at advem.lv
Mon Dec 18 01:48:19 PST 2017
On 2017-12-18 09:58, Mathias Kresin wrote:
> 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
I think we should use stock flock instead of patching and adding another
custom wheel.
If something doesn't work in stock flock we should fix that and send the
fix upstream.
Adding flock and procd_lock is intended to replace all init custom locks
and others.
(and fix the racing problem once and for all)
Regards,
Roman
More information about the Lede-dev
mailing list