diff --git a/packaging/common/cfengine-hub/preremove.sh b/packaging/common/cfengine-hub/preremove.sh index 2619cbecc..79dc9e220 100644 --- a/packaging/common/cfengine-hub/preremove.sh +++ b/packaging/common/cfengine-hub/preremove.sh @@ -9,7 +9,7 @@ fi case "`os_type`" in redhat) - test -x /sbin/chkconfig && chkconfig --del cfengine3 + test -x /sbin/chkconfig && test -f /etc/init.d/cfengine3 && chkconfig --del cfengine3 ;; debian) update-rc.d -f cfengine3 remove diff --git a/packaging/common/cfengine-non-hub/preremove.sh b/packaging/common/cfengine-non-hub/preremove.sh index 7e4fcd274..f0b8093bb 100644 --- a/packaging/common/cfengine-non-hub/preremove.sh +++ b/packaging/common/cfengine-non-hub/preremove.sh @@ -5,7 +5,7 @@ case `os_type` in # # Unregister CFEngine initscript on uninstallation. # - test -x /sbin/chkconfig && chkconfig --del cfengine3 + test -x /sbin/chkconfig && test -f /etc/init.d/cfengine3 && chkconfig --del cfengine3 # # systemd support