summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-dialup')
-rw-r--r--net-dialup/openl2tp/files/openl2tpd.initd16
1 files changed, 9 insertions, 7 deletions
diff --git a/net-dialup/openl2tp/files/openl2tpd.initd b/net-dialup/openl2tp/files/openl2tpd.initd
index 6c0a8e5..cc4568d 100644
--- a/net-dialup/openl2tp/files/openl2tpd.initd
+++ b/net-dialup/openl2tp/files/openl2tpd.initd
@@ -41,13 +41,15 @@ start() {
# it is possible to not to have config at all
if [ "${userpc}" = "yes" ] && [ -r "${OPENL2TPD_CONFIG_FILE}" ]; then
- # on system startup it may take some time to load daemon
- for (( i=0; i<$retry_count; i++ )); do
- l2tpconfig config restore file="${OPENL2TPD_CONFIG_FILE}" >/dev/null 2>&1
- retcode=$?
- [ ${retcode} = 0 ] && break
- sleep $retry_delay
- done
+ # on system startup it may take some time to load daemon
+ local i=0;
+ while [ $i -lt $retry_count ]; do
+ l2tpconfig config restore file="${OPENL2TPD_CONFIG_FILE}" >/dev/null 2>&1
+ retcode=$?
+ [ ${retcode} = 0 ] && break
+ i=$((i+1))
+ sleep $retry_delay
+ done
fi
eend $retcode
}