init-functions now checks for read access before attempting to read environ

This commit is contained in:
2017-12-10 11:47:48 -06:00
parent 8d4cb9e335
commit 97906ebe04
2 changed files with 5 additions and 2 deletions

View File

@@ -8,7 +8,10 @@
# be enough
#
chkcontainer=$(sed 's/\x0/\n/g' < /proc/1/environ|grep -ia '^container\|^LXC')
if [ -r /proc/1/environ ]; then
chkcontainer=$(sed 's/\x0/\n/g' < /proc/1/environ|grep -ia '^container\|^LXC')
fi
[ -n "$chkcontainer" ] && export $chkcontainer
COL52="\\033[52G"