#! /bin/sh
# /etc/rc.d/rc.inet1
# This script is used to bring up the various network interfaces.
#
# Modified for FANX by Liony.
#
if [ "$1" = "start" -o "$1" = "" ]; then
ifconfig lo down 2>/dev/null
/sbin/ifconfig lo 127.0.0.1 2>/dev/null
/sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo 2>/dev/null
for eth in `ls /sys/class/net | grep -v sit`; do
# check if dhcpcd is not already running for $eth interface,
# in that case it was started by hotplug? so don't start it again
# if [ "$eth" != "lo" -a ! -e /etc/dhcpc/dhcpcd-$eth.pid ]; then
# echo "Auto Configure IP address for $eth: /sbin/dhcpcd -t 60 $eth &"
# /sbin/dhcpcd -t 60 $eth &
# fi
# done
if [ "$eth" != "lo" ]; then
/sbin/ifconfig eth0 192.168.1.20 netmask 255.255.255.0
/sbin/route add default gateway 192.168.1.1
echo "Network interface eth0 set to 192.168.1.20/24"
fi
done