procd: allow passing multiple config files to procd_add_reload_trigger
authorFelix Fietkau <nbd@openwrt.org>
Wed, 11 Jun 2014 17:05:46 +0000 (17:05 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 11 Jun 2014 17:05:46 +0000 (17:05 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 41146

package/system/procd/files/procd.sh

index 228652db97e3f1d5a0fb3de6524d3110516da0d7..785b6ce0ca912713d4ed75663986ded0d3616744 100644 (file)
@@ -198,9 +198,12 @@ _procd_add_config_trigger() {
 _procd_add_reload_trigger() {
        local script=$(readlink "$initscript")
        local name=$(basename ${script:-$initscript})
+       local file
 
        _procd_open_trigger
-       _procd_add_config_trigger "config.change" $1 /etc/init.d/$name reload
+       for file in "$@"; do
+               _procd_add_config_trigger "config.change" "$file" /etc/init.d/$name reload
+       done
        _procd_close_trigger
 }