Project

General

Profile

« Previous | Next » 

Revision db7f618b

Added by Seth Mos about 16 years ago

Yank bridge upgrade function as it appears to be a duplicate. I should have checked before making one. Oh well.

View differences:

etc/inc/upgrade_config.inc
585 585

  
586 586
function upgrade_037_to_038() {
587 587
	global $config;
588

  
589
	/* This should only be valid when upgrading bridges from a 1.2 config */
590
	$a_bridges = array();
591
	$counter = 0;
592
	foreach($config['interfaces'] as $name => & $interface ) {
593
		if($interface['bridge'] <> "") {
594
			$bridge = array();
595
			$bridge['members'] = "{$name},{$interface['bridge']}";
596
			$bridge['descr'] = "Upgraded from 1.2";
597
			$bridge['maxaddr'] = "";
598
			$bridge['timeout'] = "";
599
			$bridge['maxage'] = "";
600
			$bridge['fwdelay'] = "";
601
			$bridge['hellotime'] = "";
602
			$bridge['priority'] = "";
603
			$bridge['proto'] = "rstp";
604
			$bridge['holdcount'] = "";
605
			$bridge['ifpriority'] = "";
606
			$bridge['ifpathcost'] = "";
607
			$bridge['bridgeif'] = "bridge{$counter}";
608
			$a_bridges[$counter] = $bridge;
609
			$counter++;
610
		}
611
	}
612
	$config['bridges'] = $a_bridges;
588
	/* Insert upgrade code here */
613 589
}
614 590

  
615 591

  

Also available in: Unified diff