diff options
author | Ermal <eri@pfsense.org> | 2012-05-23 18:55:31 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2012-05-23 18:55:31 +0000 |
commit | d996dfeab2ec40cf3fb44b51811333b40ed5073f (patch) | |
tree | 14c6de9aca9b43277e34e84b3ca375573b447ab0 /etc | |
parent | e27d337d88b5a49ebfde0dbe8f6f7fa60db444ee (diff) | |
download | pfsense-d996dfeab2ec40cf3fb44b51811333b40ed5073f.zip pfsense-d996dfeab2ec40cf3fb44b51811333b40ed5073f.tar.gz |
Rather do a fix by going through vips in reverse order
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/upgrade_config.inc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/etc/inc/upgrade_config.inc b/etc/inc/upgrade_config.inc index cc953ce..53da378 100644 --- a/etc/inc/upgrade_config.inc +++ b/etc/inc/upgrade_config.inc @@ -2796,9 +2796,11 @@ function upgrade_085_to_086() { write_config(); if (is_array($config['virtualips']['vip'])) { $vipchg = array(); - foreach ($config['virtualips']['vip'] as $vip) { - file_put_contents("{$g['tmp_path']}/vipreplace", "s/vip{$vip['vhid']}</{$vip['interface']}_vip{$vip['vhid']}/g\n"); - } + foreach ($config['virtualips']['vip'] as $vip) + $vipchg[$vip['vhid']] = $vip; + ksort($vipchg); + foreach (array_reverse($vipchg) as $vip) + file_put_contents("{$g['tmp_path']}/vipreplace", "s/vip{$vip['vhid']}/{$vip['interface']}_vip{$vip['vhid']}/g\n"); mwexec("/usr/bin/sed -I \"\" -f {$g['tmp_path']}/vipreplace /conf/config.xml"); require_once("config.lib.inc"); $config = parse_config(true); |