aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Smith <colin@pfsense.org>2005-03-03 01:29:38 +0000
committerColin Smith <colin@pfsense.org>2005-03-03 01:29:38 +0000
commit9dfdfcef0604813948caa723ff7f70d5b95bba06 (patch)
tree8a4ac7e10fa1d071632379cb4dde9c25f25bbf55
parent020f191a56fcad5380c1a88798f7f017af123ada (diff)
downloadpfsense-packages-9dfdfcef0604813948caa723ff7f70d5b95bba06.tar.gz
pfsense-packages-9dfdfcef0604813948caa723ff7f70d5b95bba06.tar.bz2
pfsense-packages-9dfdfcef0604813948caa723ff7f70d5b95bba06.zip
* Make ntop save configuration information in config.xml
* Wrap sync_package_ntop() around sync information. * Set $_POST to stored XML configuration if $_POST is not defined.
-rw-r--r--packages/ntop/ntop.xml7
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/ntop/ntop.xml b/packages/ntop/ntop.xml
index 56f19ed0..2aa5ba5b 100644
--- a/packages/ntop/ntop.xml
+++ b/packages/ntop/ntop.xml
@@ -3,7 +3,6 @@
<title>Diagnostics: NTop</title>
<name>ntop</name>
<version>3.0</version>
- <donotsave>true</donotsave>
<preoutput>yes</preoutput>
<savetext>Change</savetext>
<!-- Menu is where this packages menu will appear -->
@@ -54,8 +53,10 @@
</field>
</fields>
<custom_add_php_command>
+ function sync_package_ntop() {
conf_mount_rw();
config_lock();
+ if($_POST == "") $_POST = $config['installedpackages']['ntop']['config'];
if($_POST['password'] == $_POST['passwordagain']) {
$interfaces = " -i ";
$ifaces=$_POST['iface'];
@@ -82,7 +83,11 @@
echo "Passwords do not match!";
exit;
}
+ }
</custom_add_php_command>
+ <custom_php_resync_command>
+ sync_package_ntop();
+ </custom_php_resync_command>
<custom_php_deinstall_command>
mwexec("/usr/bin/killall ntop");
</custom_php_deinstall_command>