diff --git a/elements/disable-firewall/post-install.d/30-disable-firewalld b/elements/disable-firewall/post-install.d/30-disable-firewalld index 277d552e..fc2240db 100755 --- a/elements/disable-firewall/post-install.d/30-disable-firewalld +++ b/elements/disable-firewall/post-install.d/30-disable-firewalld @@ -7,8 +7,8 @@ set -eu set -o pipefail case "${DISTRO_NAME}" in - fedora | centos | rhel | rhel7 ) - if which systemctl; then + fedora | centos | centos7 | rhel | rhel7 ) + if which systemctl && [[ $(systemctl --no-pager list-unit-files firewalld) =~ 'enabled' ]]; then systemctl disable firewalld fi ;;