diff options
author | Simon Rettberg | 2013-07-05 12:27:41 +0200 |
---|---|---|
committer | Simon Rettberg | 2013-07-05 12:27:41 +0200 |
commit | b50458a10a02949332223c67eeae2b18c0ba509f (patch) | |
tree | 9ad0103cce2e6e2badb314a1396a0a96a506326a /remote/rootfs/rootfs-stage32/data/opt/openslx/bin/penv | |
parent | [pam] Cleanup, formatting, force nscd usage in nsswitch.conf, set timeouts fo... (diff) | |
download | tm-scripts-b50458a10a02949332223c67eeae2b18c0ba509f.tar.gz tm-scripts-b50458a10a02949332223c67eeae2b18c0ba509f.tar.xz tm-scripts-b50458a10a02949332223c67eeae2b18c0ba509f.zip |
[rootfs-stage32] Add swapon command for found swap partition, fixes #458
Diffstat (limited to 'remote/rootfs/rootfs-stage32/data/opt/openslx/bin/penv')
-rwxr-xr-x | remote/rootfs/rootfs-stage32/data/opt/openslx/bin/penv | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/remote/rootfs/rootfs-stage32/data/opt/openslx/bin/penv b/remote/rootfs/rootfs-stage32/data/opt/openslx/bin/penv new file mode 100755 index 00000000..ca5a23ac --- /dev/null +++ b/remote/rootfs/rootfs-stage32/data/opt/openslx/bin/penv @@ -0,0 +1,7 @@ +#!/bin/sh + +[ "x$UID" != "x0" ] && echo "You need to be root." && exit 1 +[ "$#" -ne "1" ] && echo "Usage: $0 PID" && exit 1 +[ ! -d "/proc/$1/environ" ] && echo "No such process: $1" && exit 1 +sed 's/\x0/\n/g' "/proc/$1/environ" | grep -E --color=auto '^[^=]*' + |