umdns: prevent a few 'uci: Entry not found'
authorPaul Donald <newtwen@gmail.com>
Sun, 11 Feb 2024 22:44:42 +0000 (23:44 +0100)
committerPaul Donald <newtwen@gmail.com>
Tue, 27 Feb 2024 19:10:08 +0000 (20:10 +0100)
pass '-q' switch to uci to prevent spurious output

Signed-off-by: Paul Donald <newtwen@gmail.com>
package/network/services/umdns/files/umdns.init

index 1ae1cccb039ca33b35f0abb88a6896b308075f9d..7f25595f2493aa863e158c59de3d2d3461e42e39 100644 (file)
@@ -8,7 +8,7 @@ PROG=/usr/sbin/umdns
 IFACES=""
 
 load_ifaces() {
-       local network="$(uci get umdns.@umdns[-1].network)"
+       local network="$(uci -q get umdns.@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.@umdns[-1].network)"
+       local network="$(uci -q get umdns.@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.@umdns[-1].jail)" = 1 ] && procd_add_jail umdns ubus log
+       [ "$(uci -q get umdns.@umdns[-1].jail)" = 1 ] && procd_add_jail umdns ubus log
        procd_close_instance
 }