2.9.1. rc.event.local

The shell script /etc/rc.d/rc.event.local replaces the file /etc/rc.d/rc.local from earlier versions, and extends its functionality. It's now called when IPCop boots, is shutdown, the network interfaces (excluding Red) are started or stopped, or when the Red interface goes up or down. It can contain your own specific commands to be run at these particular events.

For example, the script is called like this at boot:

/etc/rc.d/rc.event.local system up

The first parameter is an event: system, network, red

The second parameter is a value: up, down

Look inside the file for an example of how to add your own commands. For instance, to setup an internal modem at startup, you could do this:

if [ ${1} == "system" -a ${2} == "up" ]; then
    echo "Setting up modem"
    setserial /dev/ttyS2 uart 16550A irq 12 port 0x2400
fi

(The irq and port numbers are just examples, and will vary on different systems).

Or, if you want to enable screen blanking of a display terminal connected to IPCop, which acts as a screensaver and avoids burn-in by blanking the display screen after a period of inactivity, you could add this:

if [ ${1} == "system" -a ${2} == "up" ]; then
    echo -e "Enable screen blanking ... \033[9;1]"
fi

The rc.event.local file will not be overwritten by Official Updates, and is included in the set of files saved when you backup the system.