mirror of
				https://github.com/Ysurac/openmptcprouter.git
				synced 2025-03-09 15:40:20 +00:00 
			
		
		
		
	Added support for DSA and PHY default config
This commit is contained in:
		
							parent
							
								
									ef75c95d50
								
							
						
					
					
						commit
						e5393baa84
					
				
					 3 changed files with 26 additions and 16 deletions
				
			
		
							
								
								
									
										26
									
								
								root/target/linux/sunxi/base-files/etc/uci-defaults/99-switch-config
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										26
									
								
								root/target/linux/sunxi/base-files/etc/uci-defaults/99-switch-config
									
										
									
									
									
										Executable file
									
								
							|  | @ -0,0 +1,26 @@ | |||
| if [ -f "/etc/.lamobo-r1.dsa" ]; then | ||||
| 	uci delete network.@switch_vlan[1] | ||||
| 	uci delete network.@switch_vlan[0] | ||||
| 	uci delete network.@switch[0] | ||||
| 
 | ||||
| 	uci set network.lan.type=bridge | ||||
| 	uci set network.lan.ifname="wan" | ||||
| 
 | ||||
| 	uci set network.wan1.type=bridge | ||||
| 	uci set network.wan2.type=bridge | ||||
| 	uci set network.wan3.type=bridge | ||||
| 	uci set network.wan4.type=bridge | ||||
| 
 | ||||
| 	uci set network.wan1.ifname="lan1" | ||||
| 	uci set network.wan2.ifname="lan2" | ||||
| 	uci set network.wan3.ifname="lan3" | ||||
| 	uci set network.wan4.ifname="lan4" | ||||
| else | ||||
| 	uci set network.@switch_vlan[0].vlan=10 | ||||
| 	uci set network.@switch_vlan[1].vlan=20 | ||||
| 
 | ||||
| 	uci set network.@switch_vlan[0].ports="4 0 1 2 8t" | ||||
| 	uci set network.@switch_vlan[1].ports="3 8" | ||||
| fi | ||||
| uci commit | ||||
| exit 0 | ||||
|  | @ -1,10 +0,0 @@ | |||
| if [ -f "/etc/.lamobo-r1.dsa" ]; then | ||||
| 	uci delete network.@switch_vlan[1] | ||||
| 	uci delete network.@switch_vlan[0] | ||||
| 	uci delete network.@switch[0] | ||||
| else | ||||
| 	uci set network.@switch_vlan[0].vlan=10 | ||||
| 	uci set network.@switch_vlan[1].vlan=20 | ||||
| fi | ||||
| uci commit | ||||
| exit 0 | ||||
|  | @ -1,6 +0,0 @@ | |||
| if [ -f "/etc/.lamobo-r1.phy" ]; then | ||||
| 	uci set network.@switch_vlan[0].ports="4 0 1 2 8t" | ||||
| 	uci set network.@switch_vlan[1].ports="3 8" | ||||
| 	uci commit | ||||
| fi | ||||
| exit 0 | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue