* newbie and system with two SLIP interfaces.
@ 1999-10-12 4:00 Kevin Beauchamp
1999-10-14 4:00 ` Pit Linnartz
0 siblings, 1 reply; 5+ messages in thread
From: Kevin Beauchamp @ 1999-10-12 4:00 UTC (permalink / raw)
Hello:
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?
Thanks in advance
Kevin Beauchamp
University of Alberta
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: newbie and system with two SLIP interfaces.
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
0 siblings, 1 reply; 5+ messages in thread
From: Pit Linnartz @ 1999-10-14 4:00 UTC (permalink / raw)
the file you're looking for is /sbin/init.d/inet
search for slattach. There you could add the other interface too
Pit
Kevin Beauchamp wrote in message <7u0civ$irg$1@pulp.srv.ualberta.ca>...
>Hello:
>
>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?
>
>Thanks in advance
>Kevin Beauchamp
>University of Alberta
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: newbie and system with two SLIP interfaces.
1999-10-14 4:00 ` Pit Linnartz
@ 1999-10-14 4:00 ` Kevin Beauchamp
1999-10-15 4:00 ` Pit Linnartz
0 siblings, 1 reply; 5+ messages in thread
From: Kevin Beauchamp @ 1999-10-14 4:00 UTC (permalink / raw)
"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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: newbie and system with two SLIP interfaces.
1999-10-14 4:00 ` Kevin Beauchamp
@ 1999-10-15 4:00 ` Pit Linnartz
1999-10-15 4:00 ` Kevin Beauchamp
0 siblings, 1 reply; 5+ messages in thread
From: Pit Linnartz @ 1999-10-15 4:00 UTC (permalink / raw)
First I have to admit that the last time I played with SLIP was OSF V1.3
days.
>
>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
This is actual to get the interface configured before up.
> 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
(man test, -a means binary AND) ok I would agree that -x could be used
instead of -f
but it means essentially
if there was no failure before and the file /usr/sbin/slattach exist and the
devval contains "sl" as
the first two chars.
> slipdev=$slipdev$num # SLIPTTY_n
> eval slipval=\$$slipdev # value of SLIPTTY_n
Here is the error. pls enter
slipdev=SLIPTTY_
> if [ "$slipval" != '' ]; then
> /usr/sbin/slattach $slipval
This should cure your problem. What essentially happens is that you obtain
SLIPTTY_3 in the first run, than
SLIPTTY_34 in the second etc due to the fact that slipdev isn't reseted.
Thanks for pointing this out.
Do you report the problem by yourself.
Pit
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: newbie and system with two SLIP interfaces.
1999-10-15 4:00 ` Pit Linnartz
@ 1999-10-15 4:00 ` Kevin Beauchamp
0 siblings, 0 replies; 5+ messages in thread
From: Kevin Beauchamp @ 1999-10-15 4:00 UTC (permalink / raw)
"Pit Linnartz" <linnartz@software-ag.de> writes:
> First I have to admit that the last time I played with SLIP was
> OSF V1.3 days.
[- snip -]
>> slipdev=$slipdev$num # SLIPTTY_n
>> eval slipval=\$$slipdev # value of SLIPTTY_n
>
> Here is the error. pls enter
> slipdev=SLIPTTY_
>
>> if [ "$slipval" != '' ]; then
>> /usr/sbin/slattach $slipval
>
> This should cure your problem. What essentially happens is that you
> obtain SLIPTTY_3 in the first run, than SLIPTTY_34 in the second
> etc due to the fact that slipdev isn't reseted.
Thanks!
So what you're saying is that this section of the script should look
like this:
# 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
slipdev=SLIPTTY_
if [ "$slipval" != '' ]; then
/usr/sbin/slattach $slipval
fi
fi
This is done to return the value of $slipdev to what it is initialized
to near the beginning of the script, after having its original value
modified during this test.
A very similar series of commands appears later in the script which
check for SLIP devices but also tests for the existence of an slattach
pid file. Since it also modifies the value of $slipdev, I assume that
the same change must be inserted there are well.
> Thanks for pointing this out.
Thank you for finding it.
> Do you report the problem by yourself.
I'm not sure what you mean. Is there a contact to whom all of these
types of problems are reported?
Thanks again.
Kevin Beauchamp
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~1999-10-15 4:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
1999-10-15 4:00 ` Pit Linnartz
1999-10-15 4:00 ` Kevin Beauchamp
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox