[openwrt/openwrt] umdns: prevent a few 'uci: Entry not found'

LEDE Commits lede-commits at lists.infradead.org
Tue Feb 27 12:54:14 PST 2024


hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/dd8850756d046f5afc89722bc1bbb1b25f34e24a

commit dd8850756d046f5afc89722bc1bbb1b25f34e24a
Author: Paul Donald <newtwen at gmail.com>
AuthorDate: Sun Feb 11 23:44:42 2024 +0100

    umdns: prevent a few 'uci: Entry not found'
    
    pass '-q' switch to uci to prevent spurious output
    
    Signed-off-by: Paul Donald <newtwen at gmail.com>
---
 package/network/services/umdns/files/umdns.init | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/network/services/umdns/files/umdns.init b/package/network/services/umdns/files/umdns.init
index 1ae1cccb03..7f25595f24 100644
--- a/package/network/services/umdns/files/umdns.init
+++ b/package/network/services/umdns/files/umdns.init
@@ -8,7 +8,7 @@ PROG=/usr/sbin/umdns
 IFACES=""
 
 load_ifaces() {
-	local network="$(uci get umdns. at umdns[-1].network)"
+	local network="$(uci -q get umdns. at umdns[-1].network)"
 	for n in $network; do
 		local device
 		json_load "$(ifstatus $n)"
@@ -29,7 +29,7 @@ reload_service() {
 }
 
 start_service() {
-	local network="$(uci get umdns. at umdns[-1].network)"
+	local network="$(uci -q get umdns. at umdns[-1].network)"
 
 	procd_open_instance
 	procd_set_param command "$PROG"
@@ -42,7 +42,7 @@ start_service() {
 	done
 	procd_add_raw_trigger "instance.update" 5000 "/bin/ubus" "call" "umdns" "reload"
 	procd_close_trigger
-	[ "$(uci get umdns. at umdns[-1].jail)" = 1 ] && procd_add_jail umdns ubus log
+	[ "$(uci -q get umdns. at umdns[-1].jail)" = 1 ] && procd_add_jail umdns ubus log
 	procd_close_instance
 }
 




More information about the lede-commits mailing list