From 1424f3c70d34e58543de64840d708f88e5cb8379 Mon Sep 17 00:00:00 2001 From: bmeeks8 Date: Tue, 11 Aug 2015 19:52:11 -0400 Subject: Simplify future updates by removing hard-coded version strings. --- config/snort/snort_migrate_config.php | 4 ++-- config/snort/snort_post_install.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/snort/snort_migrate_config.php b/config/snort/snort_migrate_config.php index ae1daf6a..edcbb2d5 100644 --- a/config/snort/snort_migrate_config.php +++ b/config/snort/snort_migrate_config.php @@ -541,10 +541,10 @@ unset($r); // Log a message if we changed anything if ($updated_cfg) { - $config['installedpackages']['snortglobal']['snort_config_ver'] = "3.2.6"; log_error("[Snort] Settings successfully migrated to new configuration format..."); } -else +else { log_error("[Snort] Configuration version is current..."); +} ?> diff --git a/config/snort/snort_post_install.php b/config/snort/snort_post_install.php index 280f0efe..bbb2642c 100644 --- a/config/snort/snort_post_install.php +++ b/config/snort/snort_post_install.php @@ -265,8 +265,8 @@ if (stristr($config['widgets']['sequence'], "snort_alerts-container") === FALSE) $config['widgets']['sequence'] .= ",{$snort_widget_container}"; /* Update Snort package version in configuration */ -$config['installedpackages']['snortglobal']['snort_config_ver'] = "3.2.6"; -write_config("Snort pkg v3.2.6: post-install configuration saved."); +$config['installedpackages']['snortglobal']['snort_config_ver'] = $config['installedpackages']['package'][get_pkg_id("snort")]['version']; +write_config("Snort pkg v{$config['installedpackages']['package'][get_pkg_id("snort")]['version']}: post-install configuration saved."); /* Done with post-install, so clear flag */ unset($g['snort_postinstall']); -- cgit v1.2.3