add gateway to interface configuration

pi-hole@9cb4e8b broke #593
original commit 8550b76
This commit is contained in:
bcambl 2016-09-07 19:41:54 -06:00
parent 150e01be8b
commit 1dd9f0747e

View file

@ -358,6 +358,7 @@ setStaticIPv4() {
${SUDO} echo "ONBOOT=yes" >> ${IFCFG_FILE} ${SUDO} echo "ONBOOT=yes" >> ${IFCFG_FILE}
${SUDO} echo "IPADDR=$IPADDR" >> ${IFCFG_FILE} ${SUDO} echo "IPADDR=$IPADDR" >> ${IFCFG_FILE}
${SUDO} echo "PREFIX=$CIDR" >> ${IFCFG_FILE} ${SUDO} echo "PREFIX=$CIDR" >> ${IFCFG_FILE}
${SUDO} echo "GATEWAY=$IPv4gw" >> ${IFCFG_FILE}
${SUDO} echo "USERCTL=no" >> ${IFCFG_FILE} ${SUDO} echo "USERCTL=no" >> ${IFCFG_FILE}
${SUDO} ip addr replace dev "$piholeInterface" "$IPv4addr" ${SUDO} ip addr replace dev "$piholeInterface" "$IPv4addr"
if [ -x "$(command -v nmcli)" ];then if [ -x "$(command -v nmcli)" ];then