init-functions now checks for read access before attempting to read environ
This commit is contained in:
2
Makefile
2
Makefile
@@ -18,7 +18,7 @@ DESC = This package supplies the core required init scripts for startup
|
|||||||
ARCHIVE := ''
|
ARCHIVE := ''
|
||||||
SRCDIR := $(PWD)/SRC/initscripts
|
SRCDIR := $(PWD)/SRC/initscripts
|
||||||
PATCHDIR := $(PWD)/SRC/patches
|
PATCHDIR := $(PWD)/SRC/patches
|
||||||
VERSION := 1.5-0
|
VERSION := 1.6-0
|
||||||
|
|
||||||
include /usr/share/snap/Makefile.snaplinux
|
include /usr/share/snap/Makefile.snaplinux
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,10 @@
|
|||||||
# be enough
|
# be enough
|
||||||
#
|
#
|
||||||
|
|
||||||
|
if [ -r /proc/1/environ ]; then
|
||||||
chkcontainer=$(sed 's/\x0/\n/g' < /proc/1/environ|grep -ia '^container\|^LXC')
|
chkcontainer=$(sed 's/\x0/\n/g' < /proc/1/environ|grep -ia '^container\|^LXC')
|
||||||
|
fi
|
||||||
|
|
||||||
[ -n "$chkcontainer" ] && export $chkcontainer
|
[ -n "$chkcontainer" ] && export $chkcontainer
|
||||||
|
|
||||||
COL52="\\033[52G"
|
COL52="\\033[52G"
|
||||||
|
|||||||
Reference in New Issue
Block a user