#!/bin/bash

if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
    set -x
fi
set -eu
set -o pipefail

case "$DISTRO_NAME" in
    fedora | centos7 | rhel7)
        install-packages iptables-services
        ;;
esac

case "${DISTRO_NAME}" in
    fedora | centos | rhel | rhel7)
        if type -p service; then
            service iptables save
            chkconfig iptables off
        fi
    ;;
    * )
        echo "Unknown distro: $DISTRO_NAME. Skipping."
    ;;
esac
