The following list contains important notes.
All single quotes in these directions are back quotes, not forward quotes, except where specifically noted.
Be sure to execute these commands as root, from a Bourne shell (sh), not ksh, tcsh, or csh. (If you use a Bourne shell script, that's good.)
If, after following these instructions, you get modem failures, or if the add_modem script gives an error message about ttyadm: -V: invalid parameter, then make sure that root's default shell is /sbin/sh and not csh.
You want to have a maximum of one port monitor running on a given port. If you accidentally have two or more running on the port, your machine will probably panic.
There is much disagreement over whether these EEPROM settings are required. They are not used, once a port monitor is running. Just use them and it won't hurt anything.
Type eeprom ttya-rts-dtr-off=true and press Return.
To reboot the system, type init 6 and press Return.
Is it critical to reboot now? No, but you'll need to reboot at some time.
Make sure the modem is properly connected to your port and already programmed. Make sure the cable is OK. Your cable needs at least lines 1, 2, 3, 4, 5, 6, 7, 8, and 20, all straight through, with none crossed. A 25-pin cable, wired straight through is fine. A null modem cable will not work.
Is the Solaris 2.x port monitor, ttymon, configured and running? Log in as root, type sacadm -l -t ttymon, and press Return.
If you get a message like Invalid request, ttymon does not exist, the ttymon port monitor is not configured. Go to the next step.
If you get a result like the following, go to step 7.
PMTAG PMTYPE FLGS RCNT STATUS COMMAND zsmon ttymon - 0 ENABLED /usr/lib/saf/ttymon
Configure an instance of ttymon called zsmon. Type sacadm -a -p zsmon -t ttymon -c /usr/lib/saf/ttymon -v `ttyadm -V` and press Return.
Note:The string zsmon is known as a PMTAG.
Is there a service running on the zsmon port monitor? Type pmadm -l and press Return.
If you get a result like the following
PMTAG PMTYPE SVCTAG FLGS ID <PMSPECIFIC> zsmon ttymon ttya u root /dev/term/a I - .........
then you need to remove the existing service. Issue the command and insert the PMTAG and SVCTAG found in the previous command by typing pmadm -r -p zsmon -s ttya and pressing Return.
pmadm is the PMTAG, zsmon is the SVCTAG.
If you don't see your port (like /dev/term/a) listed, then you're OK.
Make a script that removes any existing port monitor and creates a new bidirectional port service.
Putting this information in a script is a Very Good Idea because if you make a mistake, you can easily fix the problem and rerun the script. Don't try to do this without a script—there are too many typing errors waiting to be made in these commands.
Type the following script as a file (for instance, /sbin/add_modem), make it executable, then run it.
#!/sbin/sh # add_modem shell script. Must be run as root from bourne shell # 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. # -p zsmon PMTAG, name of this port monitor # -s ttya SVCTAG, modem is on ttya. You may want ttyb # -d /dev/term/$PORT Actual port device. # -l contty5H Ttylabel, defined in /etc/ttydefs file. (speed # setting. contty5H=19200 baud) # -b Flag for bidirectional port use # -S n Turn software carrier off (modem supplies # hardware carrier detect signal) # "dial in/out on serial port" This is a comment you'll see on pmadm -l ######################################################################## LOGINMSG="Always be nice to your sysadm. login: " # set PORT = either a or b PORT="a" #---------------------------------------- # Choose your speed setting. See /etc/ttydefs for more, or build your # own from the examples in the rest of this article. # contty5H = 19200bps, 7 bits even parity, as supplied by Sun # conttyH = 9600bps, 7 bits even parity, as supplied by Sun TTYSPEED="contty5H" #---------------------------------------- # Change ownership of outgoing side of port to user uucp, group tty. # Change ownership of incoming side of port to user root, group tty. 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 this port. # You can ignore any error messages from this next command. # If you see the message "Invalid request, ttya does not exist under zsmon", # You may be trying to remove a port monitor which does not exist. /usr/sbin/pmadm -r -p zsmon -s tty$PORT #---------------------------------------- # Create the new port monitor. /usr/sbin/pmadm -a -p zsmon -s tty$PORT -i root -v `/usr/sbin/ttyadm -V` -fu -m "`/usr/sbin/ttyadm -p "$LOGINMSG" -d /dev/term/$PORT -s /usr/bin/login -l $TTYSPEED -b -S n -m ldterm,ttcompat`" -y "dial in/out on serial port" ############ end of add_modem script ###################################
Make the script executable by typing chmod 700 /sbin/add_modem and pressing Return. Then, run it by typing /sbin/add_modem and pressing Return.
For more information, see “Tip and /etc/remote” .
3.139.88.165