Hi ! Attached to this mail are my first version of /etc/init.d/interfaces and /etc/interfaces. (still BETA =;-)) Due to the lack of perl,sed and awk I decided to write this script totally in shell script. For this reason the only format, the config file can have is the oneliner or backslash seperated multiline format. But I think that's ok. There are still a few open points: 1. Should I really check for kernel version in the script ? I favour telling the user in the comments of /etc/interfaces that he needs to set the "basic route" for most interfaces himself (in /etc/gateways) if he has an old kernel. 2. Should I really check for already existing interfaces ? ifconfig will silently reconfigure old devices. And it is very unlikely that someone starts this script after he manually deleted interfaces he previously inserted in /etc/interfaces... (without giving them noauto) 3. I'm waiting for information about DHCP/BOOTP and packet radio. Waiting for your feedback ! read you, -christian- -- Linux - the choice of the GNU generation. Join the Debian Project http://www.debian.org Christian Hammers * Oberer Heidweg 35 * D-52477 Alsdorf * Tel: 02404-25624 50 3C 52 26 3E 52 E7 20 D2 A1 F5 16 C4 C9 D4 D3 1024/925BCB55 1997/11/01
# /etc/interfaces # # This file lists all network interfaces that gets startet at boot time. # # The format is as followed: device key1=value1 key2=value2 key3=value3 # * Long lines can be splitted in the common way by adding a '\' as last # character of the splitted line. # * The value can be put in quotation marks e.g. state="noauto" # # The following interface classes are recognised: # lo The loopback device # options for unnormal configurations # state=noauto do NOT start at boottime # # eth[n] The ethernet devices # ip Internet address # netmask netmask # broadcast broadcast address # options additional options passed to ifconfig(8) # state=noauto do NOT start at boottime # # Interfaces with the state=noauto flag set can be [de]activated # manually by /etc/interfaces start <devicename> # # ATTENTION: The kernel above 2.2.0 will set the basic routes for new # interfaces himself. If you run an older kernel, please insert these # routes manually in /etc/gateways. # (e.g. eth0 22.214.171.124/28 <=> route 126.96.36.199/28 -> eth0) # lo eth0 \ ip=192.168.1.2 \ options="broadcast=192.168.1.42" \ netmask=255.255.255.0 eth1 \ ip=192.168.3.4 \ netmask=255.255.255.0 \ broadcast=255.255.255.255 \ state="noauto"
Description: Bourne shell script
Description: PGP signature