BUILD: fix check when not in a container

Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
This commit is contained in:
Raphael Defosseux
2020-10-12 17:29:04 +02:00
parent 00926c5b7d
commit 357748dfff
+1 -1
View File
@@ -41,7 +41,7 @@ KERNEL_VERSION=$(uname -r | cut -d '.' -f1)
KERNEL_MAJOR=$(uname -r | cut -d '.' -f2)
#check if we run inside a container
IS_CONTAINER=`egrep -c "docker|podman|kubepods" /proc/self/cgroup`
IS_CONTAINER=`egrep -c "docker|podman|kubepods" /proc/self/cgroup || true`
#sudo is not needed inside a container
if [ $IS_CONTAINER -eq 0 ]
then