mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-22 13:33:56 +03:00
test: suppress not-found errors for selinuxenabled
if the binary is not available.
This commit is contained in:
parent
d1f6c3857e
commit
729292d9dd
@ -17,7 +17,7 @@ test_append_files() {
|
||||
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
|
||||
|
@ -112,7 +112,7 @@ EOF
|
||||
}
|
||||
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user