On 23 March 1999, Richard Andrews <[EMAIL PROTECTED]>
wrote:
>
>   OK disregard pty/tty problem ov previous message.  The problem is
> that as of kernel-2.1.115 the /dev/tty* and pty* have changed from
> major number 4 to major 2 and 3 respectively.  Obviously my /dev
> directory is out of date. Read "Changes" file in kernel Documentation
> directory for more info.
>
>   So the question I now have is: what is the easiest way to change all
> the /dev/tty* and /dev/pty* nodes. There are 256 of each and I don't
> want to do this manually. Is there a script available or is there a
> new /dev tar file somewhere I can use to upgrade?

    Use the attached script.  You might also want to check

        /usr/src/linux/Documentation/devices.txt

for more /dev fun (f.i. /dev/console has changed devices too).

    Regards,

    Liviu Daia

-- 
Dr. Liviu Daia               e-mail:   [EMAIL PROTECTED]
Institute of Mathematics     web page: http://www.imar.ro/~daia
of the Romanian Academy      PGP key:  http://www.imar.ro/~daia/daia.asc
#! /bin/sh
let k=0
for i in p q r s t u v w x y z a b c d e ; do
  for j in 0 1 2 3 4 5 6 7 8 9 a b c d e f ; do
    d=pty$i$j
    e=tty$i$j
    rm -f $d $e
    mknod $d c 2 $k
    mknod $e c 3 $k
    chmod ugo+rw $d $e
    chown root.tty $d $e
    let k=k+1
  done
done

Reply via email to