When an alert occurs on a port, the portmanager will attempt to execute
/etc/config/scripts/portXX.alert
(where XX is the port number, e.g. 08)
The script is run with STDIN containing the data which triggered
redirected to /dev/null, NOT to the serial port
If you wish to communicate with the port,
If the script cannot be executed, then the alert will be mailed to the address configured in
system administration section.
When a user connects to any port:
it is run when a user connects to a port. It
2 arguments, the "Port number" and the "Username". Here is a simple
echo "Welcome to port $PORT $USER"
The return value from the script controls whet
her the user is accepted or not
returned (or nothing is done on
exit as in the above script)
the user is denied access.
Here is a more complex script which reads from configuration to display the port label if
available and denies access to the root user:
g config.ports.port$PORT.label | cut
if [ "$USER" == "root" ]; then
echo "Permission denied for Super User"
Comments to this Manuals