Busybox's ash doesn't pass unexported environment variables to processes
started from within a function, so a service started with

MMM=xyz service_start blablabla

will never see the MMM variable.

Fix this by exporting the important variables.

Signed-off-by: Paul Fertser <fercer...@gmail.com>
---
 net/autossh/files/autossh.init |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/autossh/files/autossh.init b/net/autossh/files/autossh.init
index cdff07c..f81bf4d 100644
--- a/net/autossh/files/autossh.init
+++ b/net/autossh/files/autossh.init
@@ -11,8 +11,8 @@ start_instance() {
        config_get monitorport "$section" 'monitorport'
        config_get poll "$section" 'poll'
 
-       AUTOSSH_GATETIME="${gatetime:-30}" \
-       AUTOSSH_POLL="${poll:-600}" \
+       export AUTOSSH_GATETIME="${gatetime:-30}"
+       export AUTOSSH_POLL="${poll:-600}"
        service_start /usr/sbin/autossh -M ${monitorport:-20000} -f ${ssh}
 }
 
-- 
1.7.9.5

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to