Subject: Re: run cu from /etc/ttys
To: None <ghen@hmacs.cmi.ua.ac.be>
From: Frederick Bruckman <fredb@immanent.net>
List: netbsd-help
Date: 11/01/2004 11:27:50
In article <20041029235650.GA44628@lori.mine.nu>,
	geert.hendrickx@ua.ac.be (Geert Hendrickx) writes:
> Hello, 

Hi.
 
> I'm trying to turn an old unused pc into a serial terminal using NetBSD.
> I can perfectly logon to the terminal server at the other end of the
> line using "cu -l /dev/tty00" (in fact I'm typing this mail through the
> serial line), but now I want this machine to do nothing else, to just
> start cu on the console at boot (so the users won't notice the
> difference with the other dumb terminals).  
> 
> So I replaced a /usr/libexec/getty line in /etc/ttys with a /usr/bin/cu
> one and HUPed init, but then it gave some error about getty repeating
> too quickly, sleeping...  What should I do about this?  Isn't it
> possible to run arbitrary programs from /etc/ttys?  

Which line did you replace? For what you say you want to do, it should
have been console or ttyE0, of course. Just asking.

Yes, it should be possible. Maybe you HUP'd "init" while logged in
on the console, and "cu" couldn't get control away from your shell?
Try it like this: "kill -HUP 1 && exit". Or better yet, turn on wscons,
and experiment with an unused virtual console. Maybe you simply need to
invoke "cu" from a shell, as "/bin/sh -c /usr/bin/cu -l /dev/tty00",
or something.

> PS: please CC me as I'm not subscribed...  


Frederick