diff options
author | 2017-02-12 14:05:59 +0300 | |
---|---|---|
committer | 2017-02-12 14:05:59 +0300 | |
commit | 25ba223e14b4df6c68293a0ffc9474842cd6b4aa (patch) | |
tree | 832e25e6f6df4427ba272eb2e55068b7103ab0dc | |
parent | sys-cluster/torque: remove bashism from init script (diff) | |
download | bircoph-25ba223e14b4df6c68293a0ffc9474842cd6b4aa.tar.gz bircoph-25ba223e14b4df6c68293a0ffc9474842cd6b4aa.tar.bz2 bircoph-25ba223e14b4df6c68293a0ffc9474842cd6b4aa.zip |
net-dialup/openl2tp: remove bashism from init script
[[ ]] construct in the client init script is replaced by [ ] to be
POSIX compliant. Since the client init script is shipped within
tarball, the tarball is updated.
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, 8 insertions, 8 deletions
diff --git a/net-dialup/openl2tp/files/openl2tpd.initd b/net-dialup/openl2tp/files/openl2tpd.initd index 67489cc..6c0a8e5 100644 --- a/net-dialup/openl2tp/files/openl2tpd.initd +++ b/net-dialup/openl2tp/files/openl2tpd.initd @@ -1,5 +1,5 @@ #!/sbin/openrc-run -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 userpc="yes" @@ -8,16 +8,16 @@ retry_delay="0.5" bin=/usr/sbin/openl2tpd pid=/var/run/openl2tpd.pid -[[ -z "${OPENL2TPD_CONFIG_FILE}" ]] && OPENL2TPD_CONFIG_FILE="/etc/openl2tpd.conf" +[ -z "${OPENL2TPD_CONFIG_FILE}" ] && OPENL2TPD_CONFIG_FILE="/etc/openl2tpd.conf" depend() { need net - [[ $userpc == "yes" ]] && need portmap + [ "${userpc}" = "yes" ] && need portmap use dns ipsec racoon } check_module () { - if ! [[ -f /proc/net/pppol2tp ]]; then + if ! [ -f /proc/net/pppol2tp ]; then ebegin "Loading l2tp module" # try both new and old module names modprobe l2tp_ppp 2>/dev/null || modprobe pppol2tp 2>/dev/null @@ -30,7 +30,7 @@ start() { ebegin "Starting openl2tpd" # if rpc is enabled do not read config file by daemon (has bugs), # but read by l2tpconfig instead - if [[ $userpc == "yes" ]]; then + if [ "${userpc}" = "yes" ]; then conf="/dev/null" else conf="${OPENL2TPD_CONFIG_FILE}" @@ -40,12 +40,12 @@ start() { -- -c "$conf" ${OPENL2TPDARGS} # it is possible to not to have config at all - if [[ $userpc == "yes" ]] && [[ -r "${OPENL2TPD_CONFIG_FILE}" ]]; then + 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 + [ ${retcode} = 0 ] && break sleep $retry_delay done fi @@ -58,7 +58,7 @@ stop() { start-stop-daemon --stop --quiet --exec ${bin} --pidfile ${pid} rc=$? - if [[ ${RC_CMD} == "restart" ]]; then + if [ ${RC_CMD} = "restart" ]; then einfo "sleepinng for server to finilize connections" sleep 2 fi |