summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2017-08-16 10:40:03 -0300
committerRenato Botelho <renato@netgate.com>2017-08-16 11:03:20 -0300
commitf6b65ad83d141da19e70bd9ced41d1d937013e56 (patch)
tree73d71fa0c475428cd331d7432b989ddaec06e0fe
parent38c763aa8080f31f75ca1e7649860e5f8035824a (diff)
downloadpfsense-f6b65ad83d141da19e70bd9ced41d1d937013e56.zip
pfsense-f6b65ad83d141da19e70bd9ced41d1d937013e56.tar.gz
Always run additional_config_upgrade() and do it after config is written
-rw-r--r--src/etc/inc/config.lib.inc18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/etc/inc/config.lib.inc b/src/etc/inc/config.lib.inc
index 6c3fa8f..e0172c7 100644
--- a/src/etc/inc/config.lib.inc
+++ b/src/etc/inc/config.lib.inc
@@ -337,9 +337,6 @@ function convert_config() {
}
}
}
- if ($config['version'] == $g['latest_config']) {
- return; /* already at latest version */
- }
// Save off config version
$prev_version = $config['version'];
@@ -350,6 +347,11 @@ function convert_config() {
include_once("upgrade_config_custom.inc");
}
+ if ($config['version'] == $g['latest_config']) {
+ additional_config_upgrade();
+ return; /* already at latest version */
+ }
+
if (!is_array($config['system']['already_run_config_upgrade'])) {
$config['system']['already_run_config_upgrade'] = array();
}
@@ -380,14 +382,14 @@ function convert_config() {
}
}
- additional_config_upgrade();
-
- $now = date("H:i:s");
- log_error(sprintf(gettext("Ended Configuration upgrade at %s"), $now));
-
if ($prev_version != $config['version']) {
+ $now = date("H:i:s");
+ log_error(sprintf(gettext("Ended Configuration upgrade at %s"), $now));
+
write_config(sprintf(gettext('Upgraded config version level from %1$s to %2$s'), $prev_version, $config['version']));
}
+
+ additional_config_upgrade();
}
/****f* config/safe_write_file
OpenPOWER on IntegriCloud