fix(scripts): detect selinux with getenforce

chcon is widely available in coreutils, even if the system doesn't
support selinux.
This commit is contained in:
Haruue 2024-08-21 18:18:41 +08:00
parent 4c04660684
commit 00df1cab0f
No known key found for this signature in database
GPG key ID: F6083B28CBCBC148

View file

@ -465,7 +465,7 @@ check_environment_systemd() {
} }
check_environment_selinux() { check_environment_selinux() {
if ! has_command chcon; then if ! has_command getenforce; then
return return
fi fi