Merge "Ensure rhel7 image could be build"
This commit is contained in:
@@ -20,6 +20,6 @@ if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
|
|||||||
fi
|
fi
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
if [ "$DISTRO_NAME" == "centos" ]; then
|
if [[ "$DISTRO_NAME" =~ (centos|rhel7) ]] ; then
|
||||||
yum -y install --enablerepo=epel haveged
|
yum -y install --enablerepo=epel haveged
|
||||||
fi
|
fi
|
||||||
|
@@ -38,7 +38,7 @@ mv /tmp/forwarding.conf /etc/unbound/
|
|||||||
chown root:root /etc/unbound/forwarding.conf
|
chown root:root /etc/unbound/forwarding.conf
|
||||||
chmod a+r /etc/unbound/forwarding.conf
|
chmod a+r /etc/unbound/forwarding.conf
|
||||||
|
|
||||||
if [[ "$DISTRO_NAME" =~ (centos|fedora) ]] ; then
|
if [[ "$DISTRO_NAME" =~ (centos|rhel7|fedora) ]] ; then
|
||||||
LOG_FILE="/var/lib/unbound/unbound.log"
|
LOG_FILE="/var/lib/unbound/unbound.log"
|
||||||
else
|
else
|
||||||
LOG_FILE="/var/log/unbound.log"
|
LOG_FILE="/var/log/unbound.log"
|
||||||
@@ -51,7 +51,7 @@ server:
|
|||||||
verbosity: 5"
|
verbosity: 5"
|
||||||
echo "$UNBOUND_LOGGING_CONF" > /tmp/unbound-logging.conf
|
echo "$UNBOUND_LOGGING_CONF" > /tmp/unbound-logging.conf
|
||||||
|
|
||||||
if [[ "$DISTRO_NAME" =~ (centos|fedora|opensuse) ]] ; then
|
if [[ "$DISTRO_NAME" =~ (centos|rhel7|fedora|opensuse) ]] ; then
|
||||||
UNBOUND_CONFD=/etc/unbound/conf.d
|
UNBOUND_CONFD=/etc/unbound/conf.d
|
||||||
elif [[ "$DISTRO_NAME" =~ 'gentoo' ]] ; then
|
elif [[ "$DISTRO_NAME" =~ 'gentoo' ]] ; then
|
||||||
UNBOUND_CONFD=/etc/unbound/conf.d
|
UNBOUND_CONFD=/etc/unbound/conf.d
|
||||||
|
@@ -24,7 +24,7 @@ if [[ "$DISTRO_NAME" =~ (debian|ubuntu) ]] ; then
|
|||||||
rules_dir=/etc/iptables
|
rules_dir=/etc/iptables
|
||||||
ipv4_rules=${rules_dir}/rules.v4
|
ipv4_rules=${rules_dir}/rules.v4
|
||||||
ipv6_rules=${rules_dir}/rules.v6
|
ipv6_rules=${rules_dir}/rules.v6
|
||||||
elif [[ "$DISTRO_NAME" =~ (centos|fedora) ]] ; then
|
elif [[ "$DISTRO_NAME" =~ (centos|rhel7|fedora) ]] ; then
|
||||||
rules_dir=/etc/sysconfig
|
rules_dir=/etc/sysconfig
|
||||||
ipv4_rules=${rules_dir}/iptables
|
ipv4_rules=${rules_dir}/iptables
|
||||||
ipv6_rules=${rules_dir}/ip6tables
|
ipv6_rules=${rules_dir}/ip6tables
|
||||||
|
@@ -26,7 +26,7 @@ if [[ "$DISTRO_NAME" =~ (debian|ubuntu) ]] ; then
|
|||||||
else
|
else
|
||||||
service_name=netfilter-persistent
|
service_name=netfilter-persistent
|
||||||
fi
|
fi
|
||||||
elif [[ "$DISTRO_NAME" =~ (centos|fedora) ]] ; then
|
elif [[ "$DISTRO_NAME" =~ (centos|rhel7|fedora) ]] ; then
|
||||||
service_name=iptables
|
service_name=iptables
|
||||||
elif [[ "$DISTRO_NAME" == 'opensuse' ]] ; then
|
elif [[ "$DISTRO_NAME" == 'opensuse' ]] ; then
|
||||||
service_name=SuSEfirewall2
|
service_name=SuSEfirewall2
|
||||||
@@ -51,7 +51,7 @@ case "$DIB_INIT_SYSTEM" in
|
|||||||
else
|
else
|
||||||
systemctl enable ${service_name}.service
|
systemctl enable ${service_name}.service
|
||||||
fi
|
fi
|
||||||
if [[ "$DISTRO_NAME" =~ (centos|fedora) ]] ; then
|
if [[ "$DISTRO_NAME" =~ (centos|rhel7|fedora) ]] ; then
|
||||||
systemctl enable ip6tables.service
|
systemctl enable ip6tables.service
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
Reference in New Issue
Block a user