From owner-freebsd-bugs Sun Jul 2 09:39:26 1995 Return-Path: bugs-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id JAA04460 for bugs-outgoing; Sun, 2 Jul 1995 09:39:26 -0700 Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.cdrom.com (8.6.10/8.6.6) with SMTP id JAA04454 for ; Sun, 2 Jul 1995 09:39:19 -0700 Received: from sax.sax.de by irz301.inf.tu-dresden.de with SMTP (5.67b+/DEC-Ultrix/4.3) id AA00683; Sun, 2 Jul 1995 18:39:16 +0200 Received: by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id SAA12802; Sun, 2 Jul 1995 18:39:15 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.6.11/8.6.9) id SAA00308; Sun, 2 Jul 1995 18:35:24 +0200 From: J Wunsch Message-Id: <199507021635.SAA00308@uriah.heep.sax.de> Subject: Re: kern/577: SLIP requires `ifconfig up' now To: davidg@root.com Date: Sun, 2 Jul 1995 18:35:23 +0200 (MET DST) Cc: freebsd-bugs@freefall.cdrom.com In-Reply-To: <199507021057.DAA05324@corbin.Root.COM> from "David Greenman" at Jul 2, 95 03:57:55 am Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) X-Phone: +49-351-2012 669 X-Mailer: ELM [version 2.4 PL23] Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Content-Length: 2003 Sender: bugs-owner@FreeBSD.org Precedence: bulk As David Greenman wrote: > > I'm confused by this. The code was written to set the interface up whenever > slattach is run and a tty is attached. Why would you want the interface up if > this *wasn't* the case? > Can you explain your specific problem in more detail? ...I'm not sure I > agree with your recent fix. I've used to run the following script as ``configure'' script from within slattach whenever the connection had been established (or the slip unit changed, but this is supposed to never happen for me): #!/bin/sh # # called by slattach whenever the slip unit changes # # arguments: myname remote netmask "default" old-unit new-unit # $1 $2 $3 $4 $5 $6 # # NB: the old-unit and new-unit arguments are automatically added # by slattach, the rest has to be supplied to the -r/-u argument # of slattach PATH=/sbin:/usr/sbin:/bin:/usr/bin; export PATH exec 2> /var/log/slip.conf.err if [ $# != 6 ] ; then logger -p user.err "$0: wrong argument count (was $*)" exit 2 fi ifconfig sl$5 down ifconfig sl$5 delete ifconfig sl$6 inet $1 $2 netmask $3 || logger -p user.err "$0: ifconfig failed" if [ "$4" = "default" ] ; then if route -rn | grep ^default >/dev/null then route delete default fi route add default $2 fi exit 0 The line ``ifconfig sl$6 ...'' was supposed to set the interface address and mark the interface automatically `up' (as it's also the case for other interfaces e.g. ethernet). After your modification, it didn't work anymore. Sticking another ``ifconfig sl$6 up'' in the next line worked around this, but i thought it's not a good idea to break with the previous behaviour. Apparently, the interface isn't marked automatically `up' by slattach. It works now as one would expect: it's up right after the first ifconfig, and i can put it down or up later if i want. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ Never trust an operating system you don't have sources for. ;-)