[PATCH] ash: add built-in $ASH_VERSION variable
Ariadne Conill
ariadne at dereferenced.org
Thu Mar 11 19:51:01 UTC 2021
Hello,
On Thu, 11 Mar 2021, Kang-Che Sung wrote:
> On Thu, Mar 11, 2021 at 2:55 PM Ariadne Conill <ariadne at dereferenced.org> wrote:
>>
>> This is helpful for detecting if the shell is busybox ash or not,
>> which is necessary for enabling ash-specific features in /etc/profile
>> and Alpine's default $ENV.
>>
>> https://gitlab.alpinelinux.org/alpine/aports/-/issues/12398 outlines
>> the rationale for detecting what shell is running in /etc/profile and
>> similar.
>>
>> function old new delta
>> varinit_data 360 384 +24
>> .rodata 77899 77922 +23
>> bbconfig_config_bz2 6127 6120 -7
>> ------------------------------------------------------------------------------
>> (add/remove: 0/0 grow/shrink: 2/1 up/down: 47/-7) Total: 40 bytes
>>
>> Signed-off-by: Ariadne Conill <ariadne at dereferenced.org>
>
> Setting ASH_VERSION to BusyBox's version seems to be a bad idea.
> There are many variants of ash shell and BusyBox's is just one of them.
> A quick Google search also shows that ASH_VERSION (as an env variable) is used
> by someone else. The variable name is not exclusive to us.
I agree with your argument here. I will revise it to $BB_ASH_VERSION.
Ariadne
More information about the busybox
mailing list