From fa6b189eb5ec6add992bb13db935f633fb48698b Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 22 Feb 2018 13:54:34 -0800 Subject: [PATCH] Makefile: Use 'command -v selinuxenabled' instead of hard-coded path The hard-coded path landed in 488216f5 (Make sure selinuxenabled exists before executing it, 2016-10-17, #154), but there's no need to require that path. Using 'command -v' (in POSIX [1]) supports anyone who has selinuxenabled in their PATH. [1]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/command.html Signed-off-by: W. Trevor King --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1e097a13..ac8f0f12 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ CRICTL_CONFIG_DIR=${DESTDIR}/etc BASHINSTALLDIR=${PREFIX}/share/bash-completion/completions OCIUMOUNTINSTALLDIR=$(PREFIX)/share/oci-umount/oci-umount.d -SELINUXOPT ?= $(shell test -x /usr/sbin/selinuxenabled && selinuxenabled && echo -Z) +SELINUXOPT ?= $(shell command -v selinuxenabled && selinuxenabled && echo -Z) PACKAGES ?= $(shell go list -tags "${BUILDTAGS}" ./... | grep -v github.com/kubernetes-incubator/cri-o/vendor) COMMIT_NO := $(shell git rev-parse HEAD 2> /dev/null || true)