]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
procd: reload_config: support UCI overlay directory
authorJohn Crispin <john@phrozen.org>
Fri, 23 Jan 2026 08:54:11 +0000 (09:54 +0100)
committerFelix Fietkau <nbd@nbd.name>
Sat, 7 Feb 2026 09:04:17 +0000 (10:04 +0100)
Check /var/run/uci/ before /etc/config/ so that overlay configs
also trigger service reload events.

The overlay directory takes precedence, and uci show already handles
merging overlay + base configuration correctly.

Signed-off-by: John Crispin <john@phrozen.org>
package/system/procd/files/reload_config

index 3ae0de96a3f9f59697eff6e30bac2ebeb06ad15b..4d1729e7e4d6191536c53f20c7daedb95542ee00 100644 (file)
@@ -1,9 +1,11 @@
 #!/bin/sh
 rm -rf /var/run/config.check
 mkdir -p /var/run/config.check
-for config in /etc/config/*; do
+for config in /var/run/uci/* /etc/config/*; do
+       [ -f "$config" ] || continue
        file=${config##*/}
-       uci show "${file##*/}" > /var/run/config.check/$file
+       [ -f "/var/run/config.check/$file" ] && continue
+       uci show "$file" > /var/run/config.check/$file 2>/dev/null
 done
 MD5FILE=/var/run/config.md5
 [ -f $MD5FILE ] && {