aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbmeeks8 <bmeeks8@bellsouth.net>2013-06-03 21:15:32 -0400
committerbmeeks8 <bmeeks8@bellsouth.net>2013-06-03 21:15:32 -0400
commit2e1eeca3568419e2deccdba857eeba9d3e7164e8 (patch)
treebeb86149e62c67e096ec5b48837740d80980757f
parent6e7c1adafe9b7a2518ce020b8a86c8f5276b6c7b (diff)
downloadpfsense-packages-2e1eeca3568419e2deccdba857eeba9d3e7164e8.tar.gz
pfsense-packages-2e1eeca3568419e2deccdba857eeba9d3e7164e8.tar.bz2
pfsense-packages-2e1eeca3568419e2deccdba857eeba9d3e7164e8.zip
Save and restore state of "$pkg_interface" variable on exit.
-rwxr-xr-xconfig/snort/snort_check_for_rule_updates.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/config/snort/snort_check_for_rule_updates.php b/config/snort/snort_check_for_rule_updates.php
index f08ebc18..2b60b6ce 100755
--- a/config/snort/snort_check_for_rule_updates.php
+++ b/config/snort/snort_check_for_rule_updates.php
@@ -41,6 +41,8 @@ $snortdir = SNORTDIR;
$snortlibdir = SNORTLIBDIR;
$snortlogdir = SNORTLOGDIR;
+/* Save the state of $pkg_interface so we can restore it */
+$pkg_interface_orig = $pkg_interface;
if ($snort_gui_include)
$pkg_interface = "";
else
@@ -740,4 +742,7 @@ log_error(gettext("[Snort] The Rules update has finished."));
error_log(gettext("The Rules update has finished. Time: " . date("Y-m-d H:i:s"). "\n\n"), 3, $snort_rules_upd_log);
conf_mount_ro();
+/* Restore the state of $pkg_interface */
+$pkg_interface = $pkg_interface_orig;
+
?>