summaryrefslogtreecommitdiffstats
path: root/core/modules/bwlp-stage4-tweaks/data/opt/openslx/bin/penv
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/bwlp-stage4-tweaks/data/opt/openslx/bin/penv')
-rwxr-xr-xcore/modules/bwlp-stage4-tweaks/data/opt/openslx/bin/penv7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/modules/bwlp-stage4-tweaks/data/opt/openslx/bin/penv b/core/modules/bwlp-stage4-tweaks/data/opt/openslx/bin/penv
new file mode 100755
index 00000000..5d0c8dc7
--- /dev/null
+++ b/core/modules/bwlp-stage4-tweaks/data/opt/openslx/bin/penv
@@ -0,0 +1,7 @@
+#!/bin/ash
+
+[ "$#" -ne "1" ] && echo "Usage: $0 PID" && exit 1
+[ ! -e "/proc/$1/environ" ] && echo "No such process: $1" && exit 1
+[ ! -r "/proc/$1/environ" ] && echo "Cannot open process: $1" && exit 1
+sed 's/\x0/\n/g' "/proc/$1/environ" | grep -E --color=auto '^[^=]*'
+