mirror of
				https://github.com/Ysurac/openmptcprouter.git
				synced 2025-03-09 15:40:20 +00:00 
			
		
		
		
	Add tools for RUTX platform on 6.1 kernel
This commit is contained in:
		
							parent
							
								
									f9d849ae11
								
							
						
					
					
						commit
						34d19875d7
					
				
					 34 changed files with 4894 additions and 0 deletions
				
			
		|  | @ -0,0 +1,23 @@ | |||
| set_state() { | ||||
| 	local label="$1" | ||||
| 	local disable | ||||
| 
 | ||||
| 	[ -e "/sys/class/gpio/${label}_power/value" ] || return | ||||
| 
 | ||||
| 	config_get disable ${label} disable | ||||
| 
 | ||||
| 	[ "${disable}" -eq 1 ] && \ | ||||
| 		/sbin/mctl -s -m "${label}" -c || \ | ||||
| 		/sbin/mctl -p -m "${label}" -c | ||||
| } | ||||
| 
 | ||||
| do_power_modem() { | ||||
| 	[ -f /etc/board.json ] || return | ||||
| 
 | ||||
| 	[ -z "$(uci -q get system.modem.disable)" ] && /sbin/mctl -p -a -c || { | ||||
| 		config_load system | ||||
| 		config_foreach set_state mctl | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| boot_hook_add preinit_main do_power_modem | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue