ip route add default via ${GATEWAY} dev ${1}
evaluate_retval
if [ "${DNS1}" != "" ];then
- boot_mesg "Registering DNS Server for green only..."
- echo "nameserver $DNS1" > /etc/resolv.conf
+ boot_mesg "Registering DNS Server for green only..."
+ echo "nameserver $DNS1" > /etc/resolv.conf
fi
if [ "${DNS2}" != "" ];then
echo "nameserver $DNS2" >> /etc/resolv.conf
fi
if [ "${CONFIG_TYPE}" == "0" ] || [ "${CONFIG_TYPE}" == "" ]; then
- boot_mesg "Restoring default DNS Proxy Adress in resolv.conf..."
- echo "nameserver 127.0.0.1" > /etc/resolv.conf
+ boot_mesg "Restoring default DNS Proxy Adress in resolv.conf..."
+ echo "nameserver 127.0.0.1" > /etc/resolv.conf
fi
boot_mesg "Removing IPv4 address ${ADDRESS} from the ${1} interface..."
### Cleanup the system when red goes down ###
/usr/local/bin/dialctrl.pl down
- rm -f /var/ipfire/red/iface
+ rm -f /var/ipfire/red/{active,iface,*-ipaddress,dns*}
fi
else
NETADDRESS=${RED_NETADDRESS} BROADCAST=${RED_BROADCAST} \
DNS1=${DNS1} DNS2=${DNS2} GATEWAY=${DEFAULT_GATEWAY} \
/etc/rc.d/init.d/net/common/ipv4-static ${RED_DEV} up
+ touch /var/ipfire/red/active
fi
/usr/local/bin/dialctrl.pl up