From owner-freebsd-questions Wed Sep 25 00:02:12 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id AAA16142 for questions-outgoing; Wed, 25 Sep 1996 00:02:12 -0700 (PDT) Received: from sdev.blaze.net.au (sdev.blaze.net.au [203.17.53.11]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id AAA15698 for ; Wed, 25 Sep 1996 00:01:32 -0700 (PDT) Received: from localhost (davidn@localhost) by sdev.blaze.net.au (8.7.6/8.6.9) with SMTP id RAA07551; Wed, 25 Sep 1996 17:00:38 GMT Date: Wed, 25 Sep 1996 17:00:36 +0000 () From: David Nugent To: Frode Nordahl cc: "questions@FreeBSD.org" Subject: Re: Creating more /dev/ttyp's? In-Reply-To: <199609241715.TAA09847@login.bigblue.no> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk On Tue, 24 Sep 1996, Frode Nordahl wrote: >I can't find any references to /dev/ttyp* in the MAKEDEV script, >so I wonder what parameters I should use to make them with >mknod. I'm not sure of what naming conventions apply, since my /dev/directory (which I did not originally create) doesn't seem to agree with /etc/ttys. /etc/ttys seems to suggest that the sequences starts at ttyp0 - ttypf (15 ptys), and then continues ttyq0 - ttyqf, and so on. /dev/ttyp0 here starts at ttyp0 and continues up to /dev/ttypv, for 32 ptys (which is how many I happen to have enabled). So, assuming that the prefix letter changes for each 32 ptys, then the following script should do what you want (after all, it isn't the names that are important, but the major,minor device numbers - but it'd be nice to know what the correct "FreeBSD convention" is). In the meantime, just make sure that this corresponds to /dev/ttys. #!/bin/sh count=0 sub=0 pfx=p sfx='0123456789abdcefghijklmnopqrstuv' while [ $count -lt 64 ] do if [ $count = 32 ]; then pfx=q sub=32 fi sxx=`echo $sfx | cut -c $(($count - $sub + 1))` dev=/dev/tty${pfx}${sxx} cmd="mknod $dev c 5 $count" if [ ! -c $dev ]; then echo $cmd `$cmd` else echo $cmd "(exists)" fi count=$(($count + 1)) done Hope this helps, David David Nugent, Unique Computing Pty Ltd - Melbourne, Australia Voice +61-3-791-9547 Data/BBS +61-3-792-3507 3:632/348@fidonet davidn@blaze.net.au http://www.blaze.net.au/~davidn