From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,912dc989ca19d6c X-Google-Attributes: gidfee84,public From: "Pit Linnartz" Subject: Re: newbie and system with two SLIP interfaces. Date: 1999/10/15 Message-ID: <7u76i2$ks8$1@gamma.ecomp.net>#1/1 X-Deja-AN: 537047768 References: <7u0civ$irg$1@pulp.srv.ualberta.ca> <7u4pim$sop$1@gamma.ecomp.net> <7u580h$of8$1@pulp.srv.ualberta.ca> X-Server-Date: 15 Oct 1999 12:26:42 GMT X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Organization: e.comp Engineering GmbH, Germany Newsgroups: comp.unix.osf.osf1 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