sahara-image-elements/elements/disable-firewall/post-install.d/32-disable-iptables

24 lines
424 B
Bash
Executable File

#!/bin/bash
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
if [ "$DISTRO_NAME" = "fedora" ]; then
install-packages iptables-services
fi
case "${DISTRO_NAME}" in
fedora | centos | rhel )
if which service; then
service iptables save
chkconfig iptables off
fi
;;
* )
echo "Unknown distro: $DISTRO_NAME. Skipping."
;;
esac