Bug #3584
closedarpwatch package fails to start in pfsense 2.1.1
0%
Description
I'm not sure if this is a bug with arpwatch or with pfsense 2.1.1, it did not happen in pfsense 2.1 though, with the same release of arpwatch (2.1.a15_6 pkg v1.1.1), so I'm filing it in the pfsense section, also because there is an inconsistency with the services status web page (pfsense informs that arpwatch has been started, while it actually hasn't).
Description:
When the web configurator page is used to configure arpwatch, and the changes are applied, the autogenerated script /usr/local/etc/rc.d/arpwatch.sh is compiled with quotation marks enclosing the e-mail address to use for notifications, including the -m flag, like in this example:
/usr/local/sbin/arpwatch -f /var/log/arp.dat "-m someemailaddress@someemailserver.com" -i em0 > /var/log/arpwatch.reports 2>&1 &
Note that if no email address has been configured for notifications in System:Advanced:Notifications, quotation marks are still added, like this:
/usr/local/sbin/arpwatch -f /var/log/arp.dat "" -i em0 > /var/log/arpwatch.reports 2>&1 &
The presence of the quotation marks cause arpwatch to fail to start every time the script is invoked, eg. by starting the service from the web configurator gui or by rebooting pfsense. Nothing is logged in the system log though, and when starting arpwatch is attempted from the web configurator, the "arpwatch has been started" message comes up, but arpwatch doesn't actually start.
Workaround:
After applying any change to the web configurator arpwatch page, remove the quotation marks from the command above in /usr/local/etc/rc.d/arpwatch.sh
Steps to reproduce:
- Upgrade pfsense from 2.1 to 2.1.1 (confirmed) or just install 2.1.1 fresh (to be confirmed);
- Install or reinstall the arpwatch package 2.1.a15_6 pkg v1.1.1
- Configure the arpwatch package from the web configurator gui
- Verify that the /usr/local/etc/rc.d/arpwatch.sh has been automatically generated with quotation marks in the start command as detailed above
- Verify that arpwatch fails to start from the web configurator gui or by rebooting pfsense
- Verify that arpwatch starts correctly by manually editing the above script and removing the added quotation marks