Commit 57c478f9 authored by Ad Schellevis's avatar Ad Schellevis

remove legacy migrations (upgrade_config.inc), as discussed with @fichtner

parent 39fe8d83
...@@ -39,7 +39,6 @@ require_once("xmlparse.inc"); ...@@ -39,7 +39,6 @@ require_once("xmlparse.inc");
require_once("crypt.inc"); require_once("crypt.inc");
require_once("notices.inc"); require_once("notices.inc");
require_once("legacy_bindings.inc"); require_once("legacy_bindings.inc");
require_once('upgrade_config.inc');
require_once("certs.inc"); require_once("certs.inc");
/* /*
...@@ -108,32 +107,11 @@ function convert_config($verbose = false) ...@@ -108,32 +107,11 @@ function convert_config($verbose = false)
{ {
global $config; global $config;
/* hardcode this, legacy migration path is now disabled */
$latest_config = '11.2';
if (!isset($config['revision'])) { if (!isset($config['revision'])) {
/* force a revision tag for proper handling in config history */ /* force a revision tag for proper handling in config history */
write_config('Factory configuration', false); write_config('Factory configuration', false);
} }
if ($config['version'] !== $latest_config) {
$prev_version = $config['version'];
/* Loop and run upgrade_VER_to_VER() until we're at current version */
while ($config['version'] < $latest_config) {
$cur = $config['version'] * 10;
$next = $cur + 1;
$migration_function = sprintf('upgrade_%03d_to_%03d', $cur, $next);
if (function_exists($migration_function)) {
$migration_function();
}
$config['version'] = sprintf('%.1f', $next / 10);
}
if ($prev_version != $config['version']) {
write_config(sprintf('Upgraded config version level from %s to %s', $prev_version, $config['version']));
}
}
/* chain the new migration into this function call */ /* chain the new migration into this function call */
$mvc_migration = '/usr/local/opnsense/mvc/script/run_migrations.php'; $mvc_migration = '/usr/local/opnsense/mvc/script/run_migrations.php';
if ($verbose) { if ($verbose) {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment