# Authors : Nathan Coulson - nathan@linuxfromscratch.org
# Kevin P. Fleming - kpfleming@linuxfromscratch.org
# Michael Tremer - mitch@ipfire.org
+# Maniacikarus - Maniacikarus@ipfire.org
#
# Version : 00.00
#
if ip route | grep -q default; then
boot_mesg "Gateway already setup; skipping." ${WARNING}
echo_warning
+ elif [ "${CONFIG_TYPE}" == "0" ] || [ "${CONFIG_TYPE}" == "" ] && [ "${GATEWAY}" != "" ]; then
+ boot_mesg "Setting up default gateway for green only..."
+ 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
+ fi
+ if [ "${DNS2}" != "" ];then
+ echo "nameserver $DNS2" >> /etc/resolv.conf
+ fi
else
boot_mesg "Setting up default gateway..."
echo $DEFAULT_GATEWAY > /var/ipfire/red/remote-ipaddress
# Authors : Nathan Coulson - nathan@linuxfromscratch.org
# Kevin P. Fleming - kpfleming@linuxfromscratch.org
# Michael Tremer - mitch@ipfire.org
+# Maniacikarus - Maniacikarus@ipfire.org
#
# Version : 01.00
#
# Passing the variables to the script
if [ "$name" == "green" ]; then
- NAME=${name} ADDRESS=${GREEN_ADDRESS} NETMASK=${GREEN_NETMASK} \
+ if [ "${CONFIG_TYPE}" == "0" ] || [ "${CONFIG_TYPE}" == "" ]; then
+ NAME=${name} ADDRESS=${GREEN_ADDRESS} NETMASK=${GREEN_NETMASK} \
NETADDRESS=${GREEN_NETADDRESS} BROADCAST=${GREEN_BROADCAST} \
+ DNS1=${DNS1} DNS2=${DNS2} GATEWAY=${DEFAULT_GATEWAY} \
/etc/rc.d/init.d/net/common/ipv4-static ${GREEN_DEV} up
+ else
+ NAME=${name} ADDRESS=${GREEN_ADDRESS} NETMASK=${GREEN_NETMASK} \
+ NETADDRESS=${GREEN_NETADDRESS} BROADCAST=${GREEN_BROADCAST} \
+ /etc/rc.d/init.d/net/common/ipv4-static ${GREEN_DEV} up
+ fi
elif [ "$name" == "blue" ]; then
NAME=${name} ADDRESS=${BLUE_ADDRESS} NETMASK=${BLUE_NETMASK} \