diff options
author | 2017-02-12 18:08:54 +0300 | |
---|---|---|
committer | 2017-02-12 18:08:54 +0300 | |
commit | 3bb86deea7e5ff2a94fa14d9b92d93d20887b926 (patch) | |
tree | 15f2d90dede7511aba9d59b4a0784f3e1ff5e542 | |
parent | net-dialup/openl2tp: remove bashism from init script (diff) | |
download | bircoph-3bb86deea7e5ff2a94fa14d9b92d93d20887b926.tar.gz bircoph-3bb86deea7e5ff2a94fa14d9b92d93d20887b926.tar.bz2 bircoph-3bb86deea7e5ff2a94fa14d9b92d93d20887b926.zip |
net-dialup/openl2tp: fix non-POSIX loop
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Signed-off-by: Andrew Savchenko <bircoph@gentoo.org>
-rw-r--r-- | net-dialup/openl2tp/files/openl2tpd.initd | 16 |
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 } |