mirror of
				https://github.com/Telecominfraproject/wlan-ap.git
				synced 2025-10-31 02:17:58 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			31 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
| From eb0effa19e28137c39a9aeaaf44bbd2c596a1d35 Mon Sep 17 00:00:00 2001
 | |
| From: John Crispin <john@phrozen.org>
 | |
| Date: Mon, 15 Jan 2024 13:19:24 +0100
 | |
| Subject: [PATCH 33/68] netifd: only reload swconfig if something changed
 | |
| 
 | |
| Signed-off-by: John Crispin <john@phrozen.org>
 | |
| ---
 | |
|  package/network/config/netifd/files/etc/init.d/network | 6 +++++-
 | |
|  1 file changed, 5 insertions(+), 1 deletion(-)
 | |
| 
 | |
| diff --git a/package/network/config/netifd/files/etc/init.d/network b/package/network/config/netifd/files/etc/init.d/network
 | |
| index dc208c4ce0..6af668f557 100755
 | |
| --- a/package/network/config/netifd/files/etc/init.d/network
 | |
| +++ b/package/network/config/netifd/files/etc/init.d/network
 | |
| @@ -9,7 +9,11 @@ init_switch() {
 | |
|  	setup_switch() { return 0; }
 | |
|  
 | |
|  	include /lib/network
 | |
| -	setup_switch
 | |
| +        uci show network | grep @switch | sort | md5sum | cut -d" " -f1 > /var/run/swconfig.new
 | |
| +        [ "$(cat /var/run/swconfig.new)" != "$(cat /var/run/swconfig.applied)" ] && {
 | |
| +                mv /var/run/swconfig.new /var/run/swconfig.applied
 | |
| +                setup_switch
 | |
| +        }
 | |
|  }
 | |
|  
 | |
|  start_service() {
 | |
| -- 
 | |
| 2.34.1
 | |
| 
 | 
