>Here's a simple example of a script that just displays systat
>on a terminal that you could run in place of a getty:

>#!/bin/sh
>TERM=vt220 /usr/bin/sudo -u nobody /usr/bin/systat vmstat < /dev/$1 >
/dev/$1
....
>If you have problems, look at /var/log/authlog, if you see "getty
>repeating too quickly" message, the program exited straight away
>for some reason. In that case you might obtain clues by redirecting
>stdout/stderr to a file and looking for error messages.


Hello
Thanks for the suggestions.
As it turns out, I have gotten this to work (almost perfectly).
I wrote a small script:

#!/bin/sh
TERM=vt220 /usr/local/bin/minicom < /dev/ttyC0 > /dev/ttyC0

that I point to in /etc/ttys for the terminal ttyC0.

Now, even though it works, I have two questions.
First, when I was trying to make this work, at first, I got no output, but
also, I did not get any errors (when I redirected errors to a file), and,
even thought the terminal was "blank," I saw a running minicom process on
the system.  Not until I specifically added the input and output redirection
to ttyCO did the minicom session appear and work.  (and it works just like I
would expect - if I try to exit minicom, it is immediately restarted).  But,
any idea why I had to specify the input/output explicitly to get this to
work?
Second, the system will not shut down cleanly with the minicom terminal
running.  If I try to shut the system down, it seems to "hang" at the
"syncing disks" stage.  Eventually, if I power the system off and on, the
root file system is not clean.  I notice that during the shutdown, the
minicom "terminal" dose get a signal 15, and starts to close, but seems to
hang at "Reseting modem."  However, when I ran minicom directly in a
"standard" shell, it would shut down fine. I have now made the filesystems
read-only, and now turn the system off but hitting the power button, but it
bothers me that all is not "perfect."  Any ideas why the minicom session
won't close cleanly when launched via /etc/ttys?

Thanks again for the help.  The above 2 questions are more for
understanding, rather than actual practical need.

bye - ted

Reply via email to