--- Begin Message ---
- To: Adam Di Carlo <adam@onshore.com>
- Subject: boot-floppies init.d/network
- From: Edmund GRIMLEY EVANS <edmundo@rano.demon.co.uk>
- Date: Sun, 26 Sep 1999 17:02:59 +0100
- Message-id: <19990926170259.C958@rano.rano.org>
Here's a copy of what I sent to Enrique ...
Date: Sat, 25 Sep 1999 17:28:37 +0100
From: Edmund GRIMLEY EVANS <edmundo@rano.demon.co.uk>
To: Enrique Zanardi <ezanardi@ull.es>
Subject: boot-floppies init.d/network
X-Mailer: Mutt 0.95.3i
Sorry if you know about this already ...
boot-floppies/utilities/dinstall/netconfig.c was responsible for
creating an /etc/init.d/network that looks like:
#! /bin/sh
ifconfig lo 127.0.0.1
route add -net 127.0.0.0
ifconfig eth0 192.168.0.1
route add -net 192.168.0.0 netmask 255.255.255.0 eth0
In order to avoid giving errors with a 2.2.x kernel ("SIOCADDRT:
Invalid argument") it should probably look something like this
instead:
#! /bin/sh
ifconfig lo 127.0.0.1
ifconfig eth0 192.168.0.1
set `uname -r | sed -e 's/\./ /g'`
if [ $1 -eq '2' -a $2 -eq '0' ]; then
route add -net 127.0.0.0
route add -net 192.168.0.0 netmask 255.255.255.0 eth0
fi
Edmund
--- End Message ---