procd: fix default timeout for reload trigger actions
authorDenis Osvald <denis.osvald@sartura.hr>
Tue, 14 Feb 2017 16:08:49 +0000 (17:08 +0100)
committerJohn Crispin <john@phrozen.org>
Wed, 15 Feb 2017 08:35:12 +0000 (09:35 +0100)
Default trigger action timeout was added to procd.sh in commit f88e3a4c0
(procd: add default timeout for reload trigger actions)
However, the timeout value was not placed under the correct JSON-script
array nesting level and thus did not apply.

To fix this and make the timeout actually apply to the reload triggers,
we place it in the correct scope, that is the per-trigger array.

Fixes: f88e3a4c0abb60bb76a7678dd30dfdc8a808a2f1
Signed-off-by: Denis Osvald <denis.osvald@sartura.hr>
package/system/procd/files/procd.sh

index a1b9f2f0e9e0b5a4abb69dee4a0f3a70c141fc84..6347de57abb186126133d3c25ac2ce2f88a0e7a6 100644 (file)
@@ -251,9 +251,8 @@ _procd_add_interface_trigger() {
        json_close_array
 
        json_close_array
-       json_close_array
-
        _procd_add_timeout
+       json_close_array
 }
 
 _procd_add_reload_interface_trigger() {
@@ -283,10 +282,8 @@ _procd_add_config_trigger() {
        json_close_array
 
        json_close_array
-
-       json_close_array
-
        _procd_add_timeout
+       json_close_array
 }
 
 _procd_add_raw_trigger() {