*BSD News Article 75809


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!nntp.coast.net!fu-berlin.de!irz401!orion.sax.de!uriah.heep!news
From: j@uriah.heep.sax.de (J Wunsch)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Tun device ??
Date: 9 Aug 1996 20:29:20 GMT
Organization: Private BSD site, Dresden
Lines: 43
Message-ID: <4ug730$4l8@uriah.heep.sax.de>
References: <4ucs7k$h5a@news3.realtime.net>
Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch)
NNTP-Posting-Host: localhost.heep.sax.de
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Newsreader: knews 0.9.6
X-Phone: +49-351-2012 669
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F  93 21 E0 7D F9 12 D6 4E

tushar@ecpi.com (Tushar Patel) wrote:

> crw-------  1 uucp  dialer   52,   9 Aug  7 22:08 tun9
>                                   ^^^^
>                                 It has correct number.
>                             
> crw-------  1 uucp  dialer   52,   0 Aug  7 21:51 tuna
>                                   ^^^^
>                                Some how this number is not correct
> crw-------  1 uucp  dialer   52,   0 May 28 08:47 tunb
>                                   ^^^^^
>                                Same here.

> What should be the tun device after tun9, is it tuna?
> If that is correct then why the number shown in the
> mail is not correct?

Since mknod(8) doesn't know about hexadecimal digits (from MAKEDEV):

tun?)
	unit=`expr $i : 'tun\(.*\)'`	# this yields $unit="a"
	rm -f tun$unit
	mknod tun$unit c 52 $unit	# mknod tuna c 52 a -- wrong
	chown uucp.dialer tun$unit
	;;

So if you simply name them tun10, tun11 etc., it should work.


p.s.: In -current, mknod would have complained about the bad digit,
instead of silently assuming 0.  You could also rewrite the above
there into:

	mknod tun$unit c 52 0x$unit

if you prefer tuna, tunb, ... over tun10, tun11...

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)