[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: /etc/init.d/network is too simple?



Hello Piotr !

On Fri, 16.04.99 18:23 +0200, Piotr Roszatycki wrote:
> I found that original Debian /etc/init.d/network script is too simple
> for daily usage.
Yes, you're right. Please take a look at the mailing list archive and
search for a thread with the subject "RFC: new network config". It was
started by me thinking the same as you.

Back then (mid-march ?) I even wrote some scripts (attached) but they never
got included into some package because they were not perfect and I have no
chance to make them so.
The reason is that we decided that if we introduce a new scheme of network
configuration we have to do a "right thing" that supports dhcp, pcmcia,
ethernet, tokenring, dialup and everything you can configure in your
network. Needless to say that noone feld able to do that :-(

So If you or anybody want to do something better than the scripts now,
maybe take a look at the attached scripts, improve them and propose them
to the community and the maintainer of netbase.

Good luck

  -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

Attachment: interfaces.sh
Description: Bourne shell script

# /etc/interfaces 
#
# This file lists all network interfaces that gets started at boot time.
# 
# The format is as follows: interface option1=value1 option2=value2 option3=value3
# * Long lines can be split in the common way by adding a '\' as last
#   character of the split line.
# * The value can be put in quotation marks e.g. noauto="yes"
# * Comments are everything from a '#' to the end of line
# * Additional strings are appended to the commandline without further processing
#
# The following interface classes are recognised:
# lo			The loopback device
#	noauto=yes	do NOT start at boottime
#
# eth[n]		The ethernet devices
#	ip		Internet address or one of the following
#			dhcp, bootp, dhcpv6, external
#	cidr=24		specify the "netbits" instead of a netmask		
#	netmask		netmask (will override cidr!)
#	command		override ifconfig (resp. dhcpcd for DHCP)
#	noauto=yes	do NOT start at boottime
#	startscript	a script that is run when starting the interface
#	stopscript	a script that is run when stopping the interface
#
# Interfaces with the noauto=yes flag set can be [de]activated
# manually by "/etc/interfaces [start|stop] <interface>" 
#
lo

eth0 \
	ip=192.168.1.2 \
	cidr=19 \
	startscript="/tmp/test.sh" 
	

eth1 \
	ip=194.77.132.133 \
	cidr=28

eth2 \
	ip=dhcp \
	--my-own-option \
	gugu=gaga \		# such options should be commented
	noauto=yes	 

eth3 \
	ip=192.168.130.150 \
	netmask=255.255.224.0

Attachment: routes.sh
Description: Bourne shell script

# /etc/routes
#
# This file lists all the routes /etc/routes will setup or shut down when
# invoked as /etc/init.d/routes [start|stop].
#
# The format is rather simple. It is just like the route(8) command like
# syntax except of the following points:
# * you have to write the address family as first word (inet,inet6...)
# * you have to omit the add or del statement
# * long lines can be split in the common way by adding a '\' as last
#   character of the split line.
# * comments are everything from a '#' to the end of line
#
# Examples:
# inet -host 192.168.0.1 netmask 255.255.255.0 eth0
# inet default gw 192.168.1.2
# inet -net 192.168.2.3 netmask 255.255.255.0 reject
#
inet -host 194.77.132.136 eth0
inet -net 194.77.150.0 netmask 255.255.255.224 mss 1024 eth0
inet -net 192.168.0.0 netmask 255.255.0.0 reject

Reply to: