From 297ace668e4a4ffbf1fb1581e7c765e2ed158e29 Mon Sep 17 00:00:00 2001 From: Chris Buechler Date: Sun, 8 May 2016 03:10:38 -0500 Subject: Add config upgrade code to update package names. Ticket #6118 --- src/etc/inc/globals.inc | 2 +- src/etc/inc/upgrade_config.inc | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'src/etc/inc') diff --git a/src/etc/inc/globals.inc b/src/etc/inc/globals.inc index fa4d5dc..221df9e 100644 --- a/src/etc/inc/globals.inc +++ b/src/etc/inc/globals.inc @@ -99,7 +99,7 @@ $g = array( "disablecrashreporter" => false, "crashreporterurl" => "https://crashreporter.pfsense.org/crash_reporter.php", "debug" => false, - "latest_config" => "15.3", + "latest_config" => "15.4", "nopkg_platforms" => array("cdrom"), "minimum_ram_warning" => "101", "minimum_ram_warning_text" => "128 MB", diff --git a/src/etc/inc/upgrade_config.inc b/src/etc/inc/upgrade_config.inc index 2a52979..df90e9a 100644 --- a/src/etc/inc/upgrade_config.inc +++ b/src/etc/inc/upgrade_config.inc @@ -4978,4 +4978,17 @@ function upgrade_152_to_153() { } } } +function upgrade_153_to_154() { + global $config; + + // rename packages from 2.1.x + $rename_arr = array("Quagga OSPF" => "Quagga_OSPF", "System Patches" => "System_Patches"); + if (is_array($config['installedpackages']['package'])) { + foreach ($config['installedpackages']['package'] as $idx => $pkg) { + if (key_exists($pkg['name'], $rename_arr)) { + $config['installedpackages']['package'][$idx]['name'] == $rename_arr[$pkg['name']]; + } + } + } +} ?> -- cgit v1.1