if the binary is not available.
busybox="$(type -P busybox-static || type -P busybox)"
inst_simple "$busybox" "$(dirname "$busybox")/busybox"
- if selinuxenabled >/dev/null; then
+ if command -v selinuxenabled >/dev/null && selinuxenabled; then
image_install selinuxenabled
cp -ar /etc/selinux "$workspace/etc/selinux"
fi
}
function check_selinux {
- if ! selinuxenabled; then
+ if ! command -v selinuxenabled >/dev/null || ! selinuxenabled; then
echo >&2 "SELinux is not enabled, skipping SELinux-related tests"
return 0
fi