ash: in bash compat mode, always export $SHLVL
function old new delta ash_main 1437 1442 +5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
cd55f2d933
commit
5680e98451
@ -13014,7 +13014,7 @@ init(void)
|
||||
setvar2("PPID", utoa(getppid()));
|
||||
#if ENABLE_ASH_BASH_COMPAT
|
||||
p = lookupvar("SHLVL");
|
||||
setvar2("SHLVL", utoa(p ? atoi(p) + 1 : 1));
|
||||
setvar("SHLVL", utoa((p ? atoi(p) : 0) + 1), VEXPORT);
|
||||
#endif
|
||||
p = lookupvar("PWD");
|
||||
if (p) {
|
||||
|
Loading…
Reference in New Issue
Block a user