Since this is an interface to avoid issues arising from vip1 and vip11 existing and replacing vip1 will replace even vip11, put on the regex <(starting close tag).

This commit is contained in:
Ermal 2012-05-23 18:48:51 +00:00
parent 323954b113
commit e27d337d88

View File

@ -2797,7 +2797,7 @@ function upgrade_085_to_086() {
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");
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");