diff options
author | phildd <ict.advisor@nepal.inf.org> | 2012-08-24 18:24:00 +0545 |
---|---|---|
committer | phildd <ict.advisor@nepal.inf.org> | 2012-08-24 18:24:00 +0545 |
commit | 5f9d501f8f823902de7b5d0e05790b17e58410ec (patch) | |
tree | 7a5775983c53d36e782ac0a7f6c9bead4703b2ea /config | |
parent | 12e7b0af81dc97fa6952a9b3e78e140a7644eb5a (diff) | |
download | pfsense-packages-5f9d501f8f823902de7b5d0e05790b17e58410ec.tar.gz pfsense-packages-5f9d501f8f823902de7b5d0e05790b17e58410ec.tar.bz2 pfsense-packages-5f9d501f8f823902de7b5d0e05790b17e58410ec.zip |
Fix arpwatch so selected interface happens first time
See: http://forum.pfsense.org/index.php/topic,51007.0.html
After selecting an interface for arpwatch, the first time you "save" the selection is written to the config file, but arpwatch.sh gets written with the previous value. arpwatch starts on some other interface. You have to press save twice.
This fixes the problem - code as per the forum suggestion and it works nicely for me.
Diffstat (limited to 'config')
-rw-r--r-- | config/arpwatch.xml | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/config/arpwatch.xml b/config/arpwatch.xml index c88480bd..c9434075 100644 --- a/config/arpwatch.xml +++ b/config/arpwatch.xml @@ -92,7 +92,11 @@ conf_mount_rw(); config_lock(); $log_file = "/var/log/arp.dat"; - $int = $config['installedpackages']['arpwatch']['config'][0]['interface']; + if($_POST['interface'] != "") { + $int = $_POST['interface']; + } else { + $int = $config['installedpackages']['arpwatch']['config'][0]['interface']; + } $int = convert_friendly_interface_to_real_interface_name($int); $start = "touch {$log_file}\n"; $start .= "/usr/local/sbin/arpwatch -d -f {$log_file} -i {$int} > /var/log/arpwatch.reports 2>&1 &"; |