fix SELinux check to correctly identify Non-NixOS systems
All checks were successful
Nix Format Check / check-format (push) Successful in 38s

This commit is contained in:
Menno van Leeuwen 2025-01-15 11:47:12 +01:00
parent d48a3d3925
commit bbd3198976
Signed by: vleeuwenmenno
SSH Key Fingerprint: SHA256:OJFmjANpakwD3F2Rsws4GLtbdz1TJ5tkQF0RZmF0TRE

View File

@ -414,10 +414,10 @@ warning_prompt() {
check_selinux() {
# Only on Non-NixOS based systems
if ! command -v nixos-version >/dev/null 2>&1; then
if command -v nixos-version >/dev/null 2>&1; then
return 0
fi
if [ -eq "$(getenforce)" "Enforcing" ]; then
log_warning "SELinux is enabled. Adjusting SELinux to permissive mode..."
sudo setenforce Permissive || die "Failed to disable SELinux"