mirror of
				https://github.com/Telecominfraproject/wlan-ap.git
				synced 2025-10-30 18:07:52 +00:00 
			
		
		
		
	netifd: only reload swconfig if something changed
Fixes: WIFI-13251 Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
		| @@ -0,0 +1,30 @@ | |||||||
|  | From 66382792778a6647ec8809e3858e030b3bbf5554 Mon Sep 17 00:00:00 2001 | ||||||
|  | From: John Crispin <john@phrozen.org> | ||||||
|  | Date: Mon, 15 Jan 2024 13:19:24 +0100 | ||||||
|  | Subject: [PATCH] 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 | ||||||
|  |  | ||||||
		Reference in New Issue
	
	Block a user
	 John Crispin
					John Crispin