Original Post:
A couple of questions regarding port monitors:
1. When and where does the default ttymon port monitor, zsmon, get created
in Solaris 2.X.
2. If one of the serial ports gets reconfigured for, lets say, a modem, but
then the port needs to be restored to its default configuration, what would
be the correct string to issue to pmadm? Or, what is the easiest method to
restore the default configuration.
===========================================================================
Summary:
I received only one response from Gert Marais <maraisg@saps.org.za> who
suggested using admintool to configure the serial ports. This is a good
suggestion; however, I really wanted the correct arguments to pmadm so that
I could put them in a shell script. This was my mistake. I should have
been more specific, and should not have asked for the easiest method.
I also spoke to a Sun Service representative who also suggested using
admintool. He wasn't sure about pmadm.
At any rate, I solved the problem by modifying Celeste Stokely's
add_terminal script. The modified script is below.
#!/bin/sh
# add_terminal shell script. Must be run as root.
# This script invokes pmadm with the following parameters.
# Change these parameters as needed for your particular needs.
#
# PARAMETER MEANING
# --------- -------
# PORT Port you want to set up. "a" or "b"
# TTYSPEED Speed setting, from /etc/ttydefs
# LOGINMSG The login message which will be displayed.
# -s tty$PORT Terminal is on tty$PORT
# -d /dev/term/$PORT Actual port device. you may want
# -l $TTYSPEED Speed/stty setting from /etc/ttydefs. choose a
# $TTYSPEED entry that meets your needs
# -T vt100 Your default terminal type for this port. This
# is a terminfo terminal type
# -i 'terminal disabled' Message sent to the tty port if the port is
# ever disabled
# -S y Turn on software carrier
##########################################################################
PORT="b"
#----------------------------------------
# choose your speed setting. See /etc/ttydefs for more settings,
# or build your own from the examples in the rest of this article.
# conttyH = 9600bps, 7 bits even parity, as supplied by Sun
TTYSPEED="9600"
#----------------------------------------
# change ownership of outgoing side of port to user uucp, group tty.
# change ownership of incoming side of port to user root, group tty.
# (Yes, I know you're not using the outgoing side of the port, but if you
# do this now, it will be ready when you someday put a modem on the port.)
chown uucp /dev/cua/$PORT; chgrp tty /dev/cua/$PORT
chown root /dev/term/$PORT; chgrp tty /dev/term/$PORT
#----------------------------------------
# Remove any existing port monitor on the port
# You can ignore any error messages from this next command.
# You may be trying to remove a port monitor which does not exist.
/usr/sbin/pmadm -r -p zsmon -s tty$PORT > /dev/null 2>&1
#----------------------------------------
# Set eeprom settings back to default
eeprom ttyb-ignore-cd=true
eeprom ttyb-rts-dtr-off=false
eeprom ttyb-mode=9600,8,n,1,-
#----------------------------------------
# Create the new port monitor.
/usr/sbin/pmadm -a -p zsmon -s tty$PORT -i root -fu \
-v `/usr/sbin/ttyadm -V` -m "`/usr/sbin/ttyadm -l $TTYSPEED -I \
-d /dev/term/$PORT -T tvi925 -m ldterm,ttcompat -s /usr/bin/login -S y`"
############ end of add_terminal script ###################################
****************************************************************
Leo Crombach System / Network Administrator
Tropel Corporation Phone: (716) 388-3566
60 O'Connor Road Email: lcrombach@tropel.com
Fairport, New York 14450 URL: http://www.tropel.com
****************************************************************
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:36 CDT