You have added a line to create the directory /var/lib/arpwatch
This is pointless as the directory is created as part of the installed addon and contains the file ethercodes.dat Therefore there is not need to create the directory.
arpwatch only listens on one interface at a time.
I tried the original /etc/sysconfig/arpwatch and this worked fine with starting arpwatch on green0.
Confirmed by finding /var/run/arpwatch-green0.pid, checking the contents to find the pid and then running ps -p 'pid' to get the process listing fore that pid and it shows up as arpwatch, so it is running.
I also confirmed that pressing the green up arrow on the services page causes arpwatch to be started.
The problem with the services page not showing it as running is because the arpwatch initscript only has start, stop & restart and the services pages uses the status command to identify if the involved addon is running.
So I believe that your two changes to the wiki are incorrect and should be removed.
EDIT2:
Checking the initscript a bit closer, I think it is designed to be able to run multiple arpwatch instances with different pid’s defined by the interface id.
However trying the INTERFACES entry with “green0 blue0” did not result in both arpwatch-green0.pid and arpwatch-blue0.pid being created.; Only the green one was created.
EDIT3:
The INTERFACES variable is being taken in as a list of strings but for some reason in the start section it runs the commands as
Starting ARP Watch on green0… [ OK ]
Starting ARP Watch on green0… [ OK ]
However when running the stop command it takes the INTERFACES list correctly
Stopping ARP Watch on green0… [ OK ]
Stopping ARP Watch on blue0… Not running. [ WARN ]
but of course the blue0 interface arpwatch did not get started and hence it is shown as not running.
Need to figure out why the start code
for intf in ${INTERFACES}; do
boot_mesg "Starting ARP Watch on ${intf}..."
# Create the data file for this interface
if [ ! -e "/var/lib/arpwatch/${intf}.dat" ]; then
: > "/var/lib/arpwatch/${intf}.dat"
fi
PIDFILE="/var/run/arpwatch-${intf}.pid" \
loadproc -f \
/usr/sbin/arpwatch "${args[@]}" \
-P "/var/run/arpwatch-${intf}.pid" \
-f "/var/lib/arpwatch/${intf}.dat" \
-i "${intf}"
done
is not picking up the second string in the list correctly while the stop code
for intf in ${INTERFACES}; do
boot_mesg "Stopping ARP Watch on ${intf}..."
PIDFILE="/var/run/arpwatch-${intf}.pid" \
killproc /usr/sbin/arpwatch
done
is.
EDIT4:
Found out that in my debugging I had set the intf parameter to green0 and I had not removed it after my testing.
Cleared the initscript back to original and tested it with INTERFACES="green0 blue0"
and it works to create both arpwatch-green0.pid and arpwatch-blue0.pid files and both processes can be found running via ps aux
So a statement can be added to the wiki that says for multiple interfaces change the INTERFACES line to a space separated quoted string of the interface names.