mirror of
				https://github.com/Ysurac/openmptcprouter-feeds.git
				synced 2025-03-09 15:40:03 +00:00 
			
		
		
		
	Fix https://github.com/Ysurac/openmptcprouter/issues/174 (at least fix the error in log)
This commit is contained in:
		
							parent
							
								
									8bc5f10a20
								
							
						
					
					
						commit
						1061d8f263
					
				
					 1 changed files with 6 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -37,7 +37,12 @@ function multipath_bandwidth()
 | 
			
		|||
		if dev ~= "lo" and dev ~= "" then
 | 
			
		||||
			local multipath = s["multipath"] or "off"
 | 
			
		||||
			if multipath == "on" or multipath == "master" or multipath == "backup" or multipath == "handover" then
 | 
			
		||||
				result[dev] = "[" .. string.gsub((luci.sys.exec("luci-bwc -i %q 2>/dev/null" % dev)), '[\r\n]', '') .. "]"
 | 
			
		||||
				local bwc = luci.sys.exec("luci-bwc -i %q 2>/dev/null" % dev) or ""
 | 
			
		||||
				if bwc ~= nil then
 | 
			
		||||
					result[dev] = "[" .. string.gsub(bwc, '[\r\n]', '') .. "]"
 | 
			
		||||
				else
 | 
			
		||||
					result[dev] = "[]"
 | 
			
		||||
				end
 | 
			
		||||
			end
 | 
			
		||||
		end
 | 
			
		||||
	end)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue