201
Chapter 15: Advanced Configuration
Console Servers run the embedded Linux operating system. So Administrator class users can configure the Console Server and
monitor and manage attached serial console and host devices from the command line using Linux commands and the config
utility(asdescribedinChapter 14).
TheLinuxkernelintheConsoleServeralsosupportsGNUbashshellscriptenablingtheAdministratortoruncustomscripts.
This chapter presents a number of useful scripts and scripting tools including
• delete-nodewhichisageneralscriptfordeletingusers,groups,hosts,UPS'setc
• ping-detectwhichwillrunspeciedcommandswhenaspecichoststopsrespondingtopingrequests
This chapter then details how to perform advanced and custom management tasks using Linux commands and the open
source tools embedded in the Console Server:
• portmanager serial port management
• rawdataaccesstotheportsandmodems
• iptables modifications and updating IP filtering rules
• retrievingstatusinformationusingSNMPandmodifyingSNMPwithnet-snmpd
• publickeyauthenticatedSSHcommunications
• SSL,conguringHTTPSandissuingcerticates
• usingpmpower for NUT and PowerMan power device management
• usingIPMItools
• smsservertools
• disablemulticasting
15.1 Custom Scripting
TheConsoleServersupportsGNUbashshellcommands(referAppendixA)enablingtheAdministratortoruncustomscripts.
15.1.1 Custom script to run when booting
The /etc/config/rc.local script runs whenever the system boots. By default this script file is empty. You can add any commands
to this file if you want them to be run at boot time e.g. if you wanted to display hello world:
#!/bin/sh
echo "Hello World!"
If this script has been copied from a Windows machine you may need to run the following command on the script before bash
can run it successfully:
# dos2unix /etc/config/rc.local
Another scenario would be to call another custom script from the /etc/config/rc.local le,ensuringthatyourcustomscriptwill
run whenever the system is booted.