Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: kbeaucha@gpu.srv.ualberta.ca (Kevin Beauchamp)
Subject: Re: newbie and system with two SLIP interfaces.
Date: 1999/10/14	[thread overview]
Message-ID: <7u580h$of8$1@pulp.srv.ualberta.ca> (raw)
In-Reply-To: 7u4pim$sop$1@gamma.ecomp.net

"Pit Linnartz" <linnartz@software-ag.de> writes:
>Kevin Beauchamp wrote:

>>We have an older 1000 which supports two SLIP connections. We
>>have configured the system with "setup" and it appears that both
>>SLIP interfaces have the appropriate configuration parameters in
>>/etc/rc.config, and both seem to be "ifconfig"ed properly at boot.
>>
>>The problem is that only one SLIP interface (sl0) is slattached at
>>bootup. We must manually run the slattach command for the second
>>(sl1). To bring the second line up, we have to type:
>>
>> slattach /dev/tty01 38400<enter>
>>
>>After this, we are in business.
>>
>>I'm trying to find out where in the boot procedure each interface is
>>slattached, and what variables must be set/exported for each to be
>>attached successfully.
>>
>>Can anyone explain what the system does at boot to slattach its
>>configured SLIP interfaces?
>
>the file you're looking for is /sbin/init.d/inet
>search for slattach. There you could add the other interface too

Found it, but it looks as though it _should_ be smart enough to be
starting the second SLIP interface itself. Here's a snippet:

			echo > $errtmp
			/sbin/ifconfig $devval $ifval up > $errtmp 2>&1
			if [ $? != 0 ]; then
				ERROR=`cat $errtmp`
				echo "$0: ifconfig failed - $ERROR"
				FAILFLAG=1
			fi
			rm -f $errtmp
			found=`expr $found + 1`
			# get first two characters of device name
			devval2=`echo $devval | cut -c1-2`
			# if SLIP device, do slattach
			if [ "$FAILFLAG" = 0 -a -f /usr/sbin/slattach -a "$devval2" = "sl" ]; then
				slipdev=$slipdev$num	  # SLIPTTY_n
				eval slipval=\$$slipdev	  # value of SLIPTTY_n
				if [ "$slipval" != '' ]; then
					/usr/sbin/slattach $slipval
				fi
			fi
		fi
		if [ "$found" = "$NUM_NETCONFIG" ]; then
			break
		fi

It looks to me as though this script should just walk down through
the list of devices, and check each one for SLIPeriness.

I think I understand how it clips out the first two characters, but
the next test "if { "$FAILFLAG" = 0 -a -f ..." if totally opaque to
me.

I'm beginning to wonder if the script is broken, or if there is
another parameter that is supposed to be set in /etc/rc.config
Here's a selection of the relevant pieces:

NUM_NETCONFIG="5"
MAX_NETDEVS="24"
NETDEV_0="tu2"
NETDEV_1="tu1"
NETDEV_2="tu0"
NETDEV_3="sl0"
NETDEV_4="sl1"
NETDEV_5=

IFCONFIG_0="192.168.1.10 netmask 255.255.255.0"
IFCONFIG_1="192.168.1.20 netmask 255.255.255.0"
IFCONFIG_2="192.168.1.30 netmask 255.255.255.0"
IFCONFIG_3="192.168.0.30 192.168.1.149 netmask 255.255.255.0"
IFCONFIG_4="192.168.0.31 192.168.1.150 netmask 255.255.255.0"
IFCONFIG_5=

export DISPLAYTYPE HOSTNAME NUM_NETCONFIG QUOTA_CONFIG
export NETDEV_0 NETDEV_1 NETDEV_2 NETDEV_3 NETDEV_4 NETDEV_5 NETDEV_6 NETDEV_7
export IFCONFIG_0 IFCONFIG_1 IFCONFIG_2 IFCONFIG_3 IFCONFIG_4 IFCONFIG_5
export IFCONFIG_6 IFCONFIG_7 RWHOD ROUTED ROUTED_FLAGS GATED GATED_FLAGS
export ROUTER MAX_NETDEVS JOIND JOIND_FLAGS

SLIPTTY_3="tty00 38400"
export SLIPTTY_3
SLIPTTY_4="tty01 38400"
export SLIPTTY_4

I assume that the number values selected for the SLIPTTY_# variables
are related to their respective IFCONFIG_# variables.

Do I have to edit the inet script manally, or can someone see
something in it or in our rc.config that is broke?

Thanks
Kevin B.






  reply	other threads:[~1999-10-14  4:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-10-12  4:00 newbie and system with two SLIP interfaces Kevin Beauchamp
1999-10-14  4:00 ` Pit Linnartz
1999-10-14  4:00   ` Kevin Beauchamp [this message]
1999-10-15  4:00     ` Pit Linnartz
1999-10-15  4:00       ` Kevin Beauchamp
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox