Raw Access To Serial Ports; Access To Serial Ports; Accessing The Console/Modem Port - Tripp Lite B092-016 Owner's Manual

Console server management switch console server with poweralert console server
Hide thumbs Also See for B092-016:
Table of Contents

Advertisement

Chapter 15: Advanced Configuration
• Here is a more complex script which reads from configuration to display the port label if available and denies access to the
root user:
</etc/config/pmshell-start.sh>
#!/bin/sh
PORT="$1"
USER="$2"
LABEL=$(config -g config.ports.port$PORT.label | cut -f2- -d' ')
if [ "$USER" == "root" ]; then
echo "Permission denied for Super User"
exit 1
fi
if [ -z "$LABEL" ]; then
echo "Welcome $USER, you are connected to Port $PORT"
else
echo "Welcome $USER, you are connected to Port $PORT ($LABEL)"
fi
</etc/config/pmshell-start.sh>

15.3 Raw Access to Serial Ports

15.3.1 Access to serial ports

You can use tip and stty to completely bypass the portmanager and have raw access to the serial ports.
When you run tip on a portmanager controlled port, portmanager closes that port, and stops monitoring it until tip releases
control of it.
With stty, the changes made to the port only "stick" until that port is closed and opened again. So it is doubtful that people will
want to use stty for more than initial debugging of the serial connection.
If you want to use stty to configure the port, you can put stty commands in /etc/config/scripts/portXX.init which gets run
whenever portmanager opens the port.
Otherwise, any setup you do with stty will get lost when the portmanager opens the port. (the reason that portmanager sets
things back to its config rather than using whatever is on the port, is so the port is in a known good state, and will work, no
matter what things are done to the serial port outside of portmanager).

15.3.2 Accessing the console/modem port

The console dial-in is handled by mgetty, with automatic PPP login extensions. mgetty is a smart getty replacement, designed
to be used with Hayes compatible data and data/fax modems. mgetty knows about modem initialization, manual modem
answering (so your modem doesn't answer if the machine isn't ready), UUCP locking (so you can use the same device for
dial-in and dial-out). mgetty provides very extensive logging facilities. All standard mgetty options are supported.
Modem initialization strings:
• To override the standard modem initialization string either use the Management Console (refer Chapter 5) or the command
line config tool (refer Dial-In Configuration Chapter 14).
Enabling Boot Messages on the Console:
• If you are not using a modem on the DB9 console port and instead wish to connect to it directly via a Null Modem cable
you may want to enable verbose mode allowing you to see the standard linux start-up messages. This can be achieved
with the following commands:
# /bin/config --set=config.console.debug=on # /bin/config --run=console # reboot
• If at some point in the future you chose to connect a modem for dial-in out-of-band access the procedure can be reversed
with the following commands.
# /bin/config --del=config.console.debug # /bin/config --run=console # reboot
212

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents