diff options
author | Seth Mos <seth.mos@xs4all.nl> | 2009-12-18 23:22:38 +0100 |
---|---|---|
committer | Seth Mos <seth.mos@xs4all.nl> | 2009-12-18 23:23:41 +0100 |
commit | 816a5affab83ff52c6f893c2c1f1072ee5a079f6 (patch) | |
tree | 8490f1306a25ea898cb0ce2c062f8a39a190066c | |
parent | eb0facb85e206b7e77a95d9726e0537ecc6761a3 (diff) | |
download | pfsense-816a5affab83ff52c6f893c2c1f1072ee5a079f6.zip pfsense-816a5affab83ff52c6f893c2c1f1072ee5a079f6.tar.gz |
Attempt to work around both static configs and dynamic configs on load balancer upgrades. Needs testing on
live installs 1.2 => 2.0.
-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 9a45d38..7f7b404 100644 --- a/etc/inc/upgrade_config.inc +++ b/etc/inc/upgrade_config.inc @@ -1537,6 +1537,7 @@ function upgrade_053_to_054() { $lbpool_arr = $config['load_balancer']['lbpool']; $lbpool_srv_arr = array(); $gateway_group_arr = array(); + $gateways = return_gateways_array(); foreach($lbpool_arr as $lbpool) { if($lbpool['type'] == "gateway") { $gateway_group['name'] = $lbpool['name']; @@ -1547,9 +1548,10 @@ function upgrade_053_to_054() { foreach($lbpool['servers'] as $member) { $split = split("\|", $member); $interface = $split[0]; - /* on a upgraded configuration we automatically append _GW */ - /* FIXME: This won't work for dhcp or pppoe ofcourse, it needs the plain interface name for that. */ - $interface = strtoupper($interface) . "_GW"; + /* on static upgraded configuration we automatically append _GW */ + if(is_array($gateways['{$interface}_GW'])) { + $interface = strtoupper($interface) . "_GW"; + } $monitor = $split[1]; /* on failover increment tier. Else always assign 1 */ if($lbpool['behaviour'] == "failover") { |