summaryrefslogtreecommitdiffstats
path: root/etc/inc/upgrade_config.inc
diff options
context:
space:
mode:
Diffstat (limited to 'etc/inc/upgrade_config.inc')
-rw-r--r--etc/inc/upgrade_config.inc20
1 files changed, 19 insertions, 1 deletions
diff --git a/etc/inc/upgrade_config.inc b/etc/inc/upgrade_config.inc
index d8461ee..8929a88 100644
--- a/etc/inc/upgrade_config.inc
+++ b/etc/inc/upgrade_config.inc
@@ -2631,6 +2631,7 @@ function upgrade_079_to_080() {
}
function upgrade_080_to_081() {
+<<<<<<< HEAD
global $config;
global $g;
@@ -2713,13 +2714,30 @@ function upgrade_080_to_081() {
}
function upgrade_081_to_082() {
- global $config;
+ global $config, $g;
/* enable the allow IPv6 toggle */
$config['system']['ipv6allow'] = true;
+
+ /* XXX: Gross hacks in sight */
+ write_config();
+ if (is_array($config['virtualips']['vip'])) {
+ $vipchg = array();
+ foreach ($config['virtualips']['vip'] as $vip) {
+ $realif = get_real_interface($vip['interface']);
+ file_put_contents("{$g['tmp_path']}/vipreplace", "s/vip{$vip['vhid']}/{$realif}_vip{$vip['vhid']}/g\n");
+ }
+ mwexec("/bin/sh -I \"\" -f {$g['tmp_path']}/vipreplace /conf/config.xml");
+ require_once("config.lib.inc");
+ $config = parse_config(true);
+ }
}
function upgrade_082_to_083() {
global $config;
+
+ /* enable the allow IPv6 toggle if coming from 2.0.x where x > 1 */
+ $config['system']['ipv6allow'] = true;
+
/* Upgrade captiveportal config */
if (!empty($config['captiveportal'])) {
$tmpcp = $config['captiveportal'];
OpenPOWER on IntegriCloud