[comp.sys.next] How do I restore /dev/cua?

citdem@UAVAX0.CCIT.ARIZONA.EDU (06/06/91)

Well, it's happened again: another NeXT/Mach novice has stumbled and needs
a helping hand.  I clobbered /dev/cua.  Then I tried to restore by cp'ing
from my 2.1 OD.  No. No. No.  So (ahem), just how does one restore 
/dev/cua?

A related question (guess why /dev/cua was clobbered): if a serial port is
busy/locked, how does one free it up?  This all started because I brought
my Cube down too fast during a sudden T'storm.  I think I forgot to exit
kermit.  Now kermit and the modem aren't talking.  Other possibilities?

Don McCollam  (citdem@uavax0.ccit.arizona.edu - ASCII responses only, please)

louie@sayshell.umd.edu (Louis A. Mamakos) (06/07/91)

In article <00949B71.E30D81A0@UAVAX0.CCIT.ARIZONA.EDU> citdem@UAVAX0.CCIT.ARIZONA.EDU writes:
>Well, it's happened again: another NeXT/Mach novice has stumbled and needs
>a helping hand.  I clobbered /dev/cua.  Then I tried to restore by cp'ing
>from my 2.1 OD.  No. No. No.  So (ahem), just how does one restore 
>/dev/cua?

As root, change into the /dev directory.  Then incant:

	cd /dev
	./MAKEDEV std 

to recreate all of the standard devices.  Alternatively, to replace just
the /dev/cua entry, do this:

	/usr/etc/mknod /dev/cua c 11 192
	/bin/chmod     /dev/cua 600
	/usr/etc/chown uucp /dev/cua

>A related question (guess why /dev/cua was clobbered): if a serial port is
>busy/locked, how does one free it up?  This all started because I brought
>my Cube down too fast during a sudden T'storm.  I think I forgot to exit
>kermit.  Now kermit and the modem aren't talking.  Other possibilities?

Kermit and UUCP and other programs that share dial-out ttys use a
convention of creating lock files in a "known" place.  Its debatable
if this is a good convention or not, but hey, that's what we've got.
You should look in /usr/spool/uucp/LCK for lock files.  Usually
programs are smart enought to detect stale locks, but I guess tht
kermit isn't.

louie