aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Smith <colin@pfsense.org>2005-04-04 03:06:10 +0000
committerColin Smith <colin@pfsense.org>2005-04-04 03:06:10 +0000
commitfd4a79e2535b5cd78f1fa47cdb54122b96a20b49 (patch)
tree468c2c5e4bdc3088490e29f54c213cb9230d98fb
parent550fd77c1350d2e0e0489b037b35f4447fb8df56 (diff)
downloadpfsense-packages-fd4a79e2535b5cd78f1fa47cdb54122b96a20b49.tar.gz
pfsense-packages-fd4a79e2535b5cd78f1fa47cdb54122b96a20b49.tar.bz2
pfsense-packages-fd4a79e2535b5cd78f1fa47cdb54122b96a20b49.zip
Add arpwatch package.
-rw-r--r--packages/arpwatch.xml46
1 files changed, 46 insertions, 0 deletions
diff --git a/packages/arpwatch.xml b/packages/arpwatch.xml
new file mode 100644
index 00000000..97f907c2
--- /dev/null
+++ b/packages/arpwatch.xml
@@ -0,0 +1,46 @@
+<packagegui>
+ <name>arpwatch</name>
+ <title>arpwatch: Settings</title>
+ <version>2.1.a13</version>
+ <configpath>installedpackages->package->$packagename->configuration->settings</configpath>
+ <aftersaveredirect>pkg_edit.php?xml=arpwatch.xml&amp;id=0</aftersaveredirect>
+ <menu>
+ <name>arpwatch</name>
+ <tooltiptext>Modify arpwatch settings.</tooltiptext>
+ <section>Services</section>
+ <configfile>arpwatch.xml</configfile>
+ <url>/pkg_edit.php?xml=arpwatch.xml&amp;id=0</url>
+ </menu>
+ <fields>
+ <field>
+ <fielddescr>Listening Interface</fielddescr>
+ <fieldname>interface</fieldname>
+ <description>Enter the desired listening interface here.</description>
+ <type>interfaces_selection</type>
+ </field>
+ </fields>
+ <custom_php_install_command>
+ unlink_if_exists("/usr/local/etc/rc.d/arpwatch.sh");
+ </custom_php_install_command>
+ <custom_php_global_functions>
+ function sync_package_arpwatch() {
+ conf_mount_rw();
+ config_lock();
+ global $config;
+ $fout = fopen("/usr/local/etc/rc.d/arpwatch.sh","w");
+ fwrite($fout, "# This file was automatically generated by the pfSense\n# package management system.\n\n");
+ if(isset($config['installedpackages']['arpwatch']['config']['0']['interface'])) {
+ $int = convert_friendly_interface_to_real_interface_name($config['installedpackages']['arpwatch']['config']['0']['interface']);
+ fwrite($fout, "/usr/local/sbin/arpwatch -i " . $int . "\n\n");
+ }
+ fclose($fout);
+ conf_mount_ro();
+ config_unlock();
+ }
+ </custom_php_global_functions>
+ <custom_add_php_command>
+ sync_package_arpwatch();
+ mwexec("/usr/bin/killall -HUP arpwatch");
+ </custom_add_php_command>
+</packagegui>
+