Revision 7b47bd4c
Added by Ermal LUÇI over 13 years ago
etc/inc/upgrade_config.inc | ||
---|---|---|
2631 | 2631 |
} |
2632 | 2632 |
|
2633 | 2633 |
function upgrade_080_to_081() { |
2634 |
<<<<<<< HEAD |
|
2634 | 2635 |
global $config; |
2635 | 2636 |
global $g; |
2636 | 2637 |
|
... | ... | |
2713 | 2714 |
} |
2714 | 2715 |
|
2715 | 2716 |
function upgrade_081_to_082() { |
2716 |
global $config; |
|
2717 |
global $config, $g;
|
|
2717 | 2718 |
/* enable the allow IPv6 toggle */ |
2718 | 2719 |
$config['system']['ipv6allow'] = true; |
2720 |
|
|
2721 |
/* XXX: Gross hacks in sight */ |
|
2722 |
write_config(); |
|
2723 |
if (is_array($config['virtualips']['vip'])) { |
|
2724 |
$vipchg = array(); |
|
2725 |
foreach ($config['virtualips']['vip'] as $vip) { |
|
2726 |
$realif = get_real_interface($vip['interface']); |
|
2727 |
file_put_contents("{$g['tmp_path']}/vipreplace", "s/vip{$vip['vhid']}/{$realif}_vip{$vip['vhid']}/g\n"); |
|
2728 |
} |
|
2729 |
mwexec("/bin/sh -I \"\" -f {$g['tmp_path']}/vipreplace /conf/config.xml"); |
|
2730 |
require_once("config.lib.inc"); |
|
2731 |
$config = parse_config(true); |
|
2732 |
} |
|
2719 | 2733 |
} |
2720 | 2734 |
|
2721 | 2735 |
function upgrade_082_to_083() { |
2722 | 2736 |
global $config; |
2737 |
|
|
2738 |
/* enable the allow IPv6 toggle if coming from 2.0.x where x > 1 */ |
|
2739 |
$config['system']['ipv6allow'] = true; |
|
2740 |
|
|
2723 | 2741 |
/* Upgrade captiveportal config */ |
2724 | 2742 |
if (!empty($config['captiveportal'])) { |
2725 | 2743 |
$tmpcp = $config['captiveportal']; |
Also available in: Unified diff
Make vips vhid be unique per parent interface!