mirror of
				https://github.com/Telecominfraproject/wlan-ap.git
				synced 2025-10-31 02:17:58 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			31 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
| From 65f12b2e00fe04b337024d4f814664b72dc44bf6 Mon Sep 17 00:00:00 2001
 | |
| From: John Crispin <john@phrozen.org>
 | |
| Date: Wed, 23 Sep 2020 17:34:44 +0200
 | |
| Subject: [PATCH 31/40] base-files: add support for v4.4 style netdev led
 | |
|  triggers
 | |
| 
 | |
| Current owrt scripting cant handle the old v4.4 style sysfs API of led
 | |
| netdev triggers.
 | |
| 
 | |
| Signed-off-by: John Crispin <john@phrozen.org>
 | |
| ---
 | |
|  package/base-files/files/etc/init.d/led | 2 ++
 | |
|  1 file changed, 2 insertions(+)
 | |
| 
 | |
| diff --git a/package/base-files/files/etc/init.d/led b/package/base-files/files/etc/init.d/led
 | |
| index 932a69a82b..5205c5918c 100755
 | |
| --- a/package/base-files/files/etc/init.d/led
 | |
| +++ b/package/base-files/files/etc/init.d/led
 | |
| @@ -71,6 +71,8 @@ load_led() {
 | |
|  		"netdev")
 | |
|  			[ -n "$dev" ] && {
 | |
|  				echo $dev > /sys/class/leds/${sysfs}/device_name
 | |
| +				[ -e "/sys/class/leds/${sysfs}/mode" ]  && \
 | |
| +					echo $mode > /sys/class/leds/${sysfs}/mode
 | |
|  				for m in $mode; do
 | |
|  					[ -e "/sys/class/leds/${sysfs}/$m" ] && \
 | |
|  						echo 1 > /sys/class/leds/${sysfs}/$m
 | |
| -- 
 | |
| 2.25.1
 | |
| 
 | 
