#!/bin/sh

# Test if second NIC exists.
eth1_exists=`grep eth1 /proc/ioports|grep eth1|wc -l`

echo 0 > /proc/sys/net/ipv4/ip_forward
ifconfig eth0 0.0.0.0 up
if [ $eth1_exists -eq 1 ]
then
	# Doubld NIC configuration.
	ifconfig eth1 0.0.0.0 up
else
	# Single NIC configuration.
	ifconfig eth0:1 down
fi
iptables -t nat -F
route del default
