init-functions now checks for read access before attempting to read environ
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user