Fix not to rely on which, or the scriptlets will fail on EL 10 systems

This commit is contained in:
Ilia Ross 2025-06-12 19:17:50 +03:00
parent 06ce137903
commit da9aa22fa7
No known key found for this signature in database
GPG Key ID: 121E166DD9C821AB

View File

@ -662,7 +662,7 @@ if [ ! -f "$config_dir/.pre-install" ]; then
fi
# Test if we have systemd system
systemctlcmd=$(which systemctl 2>/dev/null)
systemctlcmd=$(command -v systemctl 2>/dev/null || :)
if [ -x "$systemctlcmd" ]; then
initsys=$(cat /proc/1/comm 2>/dev/null)
if [ "$initsys" != "systemd" ]; then