aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shell/ash.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c
index f9b4d3fe6..71ef9a690 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -13012,7 +13012,10 @@ init(void)
13012 } 13012 }
13013 13013
13014 setvar2("PPID", utoa(getppid())); 13014 setvar2("PPID", utoa(getppid()));
13015 13015#if ENABLE_ASH_BASH_COMPAT
13016 p = lookupvar("SHLVL");
13017 setvar2("SHLVL", utoa(p ? atoi(p) + 1 : 1));
13018#endif
13016 p = lookupvar("PWD"); 13019 p = lookupvar("PWD");
13017 if (p) { 13020 if (p) {
13018 if (*p != '/' || stat(p, &st1) || stat(".", &st2) 13021 if (*p != '/' || stat(p, &st1) || stat(".", &st2)