netifd: prevent error in ifup if no /etc/config/wireless exists, properly handle wifi-iface sections which are part of multiple networks
SVN-Revision: 33425
This commit is contained in:
		
							parent
							
								
									d365063c59
								
							
						
					
					
						commit
						f1eda43e73
					
				@ -50,7 +50,7 @@ else
 | 
				
			|||||||
	if_call "network.interface.$1"
 | 
						if_call "network.interface.$1"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ -n "$setup_wifi" ] && grep -q config /etc/config/wireless; then
 | 
					if [ -n "$setup_wifi" ] && grep -sq config /etc/config/wireless; then
 | 
				
			||||||
	. /lib/functions.sh
 | 
						. /lib/functions.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	find_related_radios() {
 | 
						find_related_radios() {
 | 
				
			||||||
@ -58,9 +58,13 @@ if [ -n "$setup_wifi" ] && grep -q config /etc/config/wireless; then
 | 
				
			|||||||
		config_get wdev "$1" device
 | 
							config_get wdev "$1" device
 | 
				
			||||||
		config_get wnet "$1" network
 | 
							config_get wnet "$1" network
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if [ -n "$wdev" ] && [ "$wnet" = "$network" ]; then
 | 
							if [ -n "$wdev" ]; then
 | 
				
			||||||
 | 
								for wnet in $wnet; do
 | 
				
			||||||
 | 
									if [ "$wnet" = "$network" ]; then
 | 
				
			||||||
					append radio_devs "$wdev" "$N"
 | 
										append radio_devs "$wdev" "$N"
 | 
				
			||||||
				fi
 | 
									fi
 | 
				
			||||||
 | 
								done
 | 
				
			||||||
 | 
							fi
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	local radio_devs
 | 
						local radio_devs
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user