aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-10-07 03:59:50 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-10-07 03:59:50 +0000
commitdf52a985406a3d4fd2f9e4a5b2666596569cf53c (patch)
tree2b5174503ced1e338c5b23ca88d2d8ada5ba3db7 /packages
parente2eb5558dac29a69d2c162f761a7d22553d60316 (diff)
downloadpfsense-packages-df52a985406a3d4fd2f9e4a5b2666596569cf53c.tar.gz
pfsense-packages-df52a985406a3d4fd2f9e4a5b2666596569cf53c.tar.bz2
pfsense-packages-df52a985406a3d4fd2f9e4a5b2666596569cf53c.zip
If we are not a cluster master, sleep between 5 and 700 minutes before invoking the upgrade to give other servers time and this also prevents snort.org from being pounded quite so hard.
Diffstat (limited to 'packages')
-rw-r--r--packages/snort/snort_download_rules.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/packages/snort/snort_download_rules.php b/packages/snort/snort_download_rules.php
index ef80edeb..5ffd1a8d 100644
--- a/packages/snort/snort_download_rules.php
+++ b/packages/snort/snort_download_rules.php
@@ -40,6 +40,20 @@ if(!$start_me_up) {
$pgtitle = "Services: Snort: Update Rules";
+/* check to see if carp settings exist, and get a handle */
+if($config['installedpackages']['carpsettings']) {
+ $carp = &$config['installedpackages']['carpsettings']['config'][0];
+ $password = $carp['password'];
+}
+
+/* if we are not a CARP cluster master, sleep for a random
+ * amount of time allowing for other members to download the configuration
+ */
+if(!$password) {
+ $sleepietime = rand(5,700);
+ sleep($sleepietime);
+}
+
/* define oinkid */
if($config['installedpackages']['snort'])
$oinkid = $config['installedpackages']['snort']['config'][0]['oinkmastercode'];