Makefile: fix "No such file or directory" error

$ make test-docker
grep: /sys/kernel/security/lsm: No such file or directory

Signed-off-by: Yang Honggang <yanghonggang@kuaishou.com>
This commit is contained in:
Yang Honggang 2020-12-20 16:53:56 +08:00 committed by mergify[bot]
parent 2870202d06
commit f3e39224ec

View File

@ -1,6 +1,6 @@
CI_IMAGE_NAME = go-ceph-ci
CONTAINER_CMD ?=
CONTAINER_OPTS := --security-opt $(shell grep -q selinux /sys/kernel/security/lsm && echo "label=disable" || echo "apparmor:unconfined")
CONTAINER_OPTS := --security-opt $(shell grep -q selinux /sys/kernel/security/lsm 2>/dev/null && echo "label=disable" || echo "apparmor:unconfined")
CONTAINER_CONFIG_DIR := testing/containers/ceph
VOLUME_FLAGS :=
CEPH_VERSION := nautilus