I've just been having a look at 1.22.0.  I note that BusyBox ash doesn't
export SHLVL.  If whatever invokes ash doesn't have SHLVL set or doesn't
have it exported each new shell has a SHLVL of 1:

   [rmy@f14vm busybox]$ cp busybox sh
   [rmy@f14vm busybox]$ unset SHLVL
   [rmy@f14vm busybox]$ ./sh
   ~/busybox $ echo $SHLVL
   1
   ~/busybox $ ./sh
   ~/busybox $ echo $SHLVL
   1
   ~/busybox $ exit
   ~/busybox $ exit
   [rmy@f14vm busybox]$ SHLVL=1
   [rmy@f14vm busybox]$ ./sh
   ~/busybox $ echo $SHLVL
   1
   ~/busybox $ ./sh
   ~/busybox $ echo $SHLVL
   1
   ~/busybox $ exit
   ~/busybox $ exit
   [rmy@f14vm busybox]$ export SHLVL
   [rmy@f14vm busybox]$ ./sh
   ~/busybox $ echo $SHLVL
   2
   ~/busybox $ ./sh
   ~/busybox $ echo $SHLVL
   3
   ~/busybox $ 

I don't know if this is likely to be important to anyone, but if it is
perhaps SHLVL should be exported.

Ron
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to