aboutsummaryrefslogtreecommitdiff
path: root/package/openvpn
diff options
context:
space:
mode:
authorGravatar Maxime Hadjinlian <maxime.hadjinlian@gmail.com>2015-10-03 23:29:57 +0200
committerGravatar Peter Korsgaard <peter@korsgaard.com>2015-10-04 00:56:41 +0200
commit0f75b2635ee564fbbdb9ea631cf39fa8731d6d6c (patch)
tree03d45236e3fe56c314f47aeb91c4b7f86d176079 /package/openvpn
parent60be80914fa263ecc06e907bc6d1249dbc80018a (diff)
downloadbuildroot-0f75b2635ee564fbbdb9ea631cf39fa8731d6d6c.tar.gz
buildroot-0f75b2635ee564fbbdb9ea631cf39fa8731d6d6c.tar.bz2
package: Replace 'echo -n' by 'printf'
'echo -n' is not a POSIX construct (no flag support), we shoud use 'printf', especially in init script. This patch was generated by the following command line: git grep -l 'echo -n' -- `git ls-files | grep -v 'patch'` | xargs sed -i 's/echo -n/printf/' Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/openvpn')
-rwxr-xr-xpackage/openvpn/S60openvpn22
1 files changed, 11 insertions, 11 deletions
diff --git a/package/openvpn/S60openvpn b/package/openvpn/S60openvpn
index 94bdc600e0..de82a5095e 100755
--- a/package/openvpn/S60openvpn
+++ b/package/openvpn/S60openvpn
@@ -14,8 +14,8 @@ test -d $CONFIG_DIR || exit 0
start_vpn () {
$DAEMON --daemon --writepid /var/run/openvpn.$NAME.pid \
- --config $CONFIG_DIR/$NAME.conf --cd $CONFIG_DIR || echo -n " FAILED->"
- echo -n " $NAME"
+ --config $CONFIG_DIR/$NAME.conf --cd $CONFIG_DIR || printf " FAILED->"
+ printf " $NAME"
}
stop_vpn () {
kill `cat $PIDFILE` || true
@@ -24,7 +24,7 @@ stop_vpn () {
case "$1" in
start)
- echo -n "Starting openvpn:"
+ printf "Starting openvpn:"
if test -z $2 ; then
for CONFIG in `cd $CONFIG_DIR; ls *.conf 2> /dev/null`; do
@@ -36,21 +36,21 @@ start)
NAME=$2
start_vpn
else
- echo -n " No such VPN: $2"
+ printf " No such VPN: $2"
fi
fi
echo "."
;;
stop)
- echo -n "Stopping openvpn:"
+ printf "Stopping openvpn:"
if test -z $2 ; then
for PIDFILE in `ls /var/run/openvpn.*.pid 2> /dev/null`; do
NAME=`echo $PIDFILE | cut -c18-`
NAME=${NAME%%.pid}
stop_vpn
- echo -n " $NAME"
+ printf " $NAME"
done
else
if test -e /var/run/openvpn.$2.pid ; then
@@ -58,16 +58,16 @@ stop)
NAME=`echo $PIDFILE | cut -c18-`
NAME=${NAME%%.pid}
stop_vpn
- echo -n " $NAME"
+ printf " $NAME"
else
- echo -n " No such VPN: $2"
+ printf " No such VPN: $2"
fi
fi
echo "."
;;
# We only 'reload' for running VPNs. New ones will only start with 'start' or 'restart'.
reload|force-reload)
- echo -n "Reloading openvpn:"
+ printf "Reloading openvpn:"
for PIDFILE in `ls /var/run/openvpn.*.pid 2> /dev/null`; do
NAME=`echo $PIDFILE | cut -c18-`
NAME=${NAME%%.pid}
@@ -76,12 +76,12 @@ reload|force-reload)
stop_vpn
sleep 1
start_vpn
- echo -n "(restarted)"
+ printf "(restarted)"
else
kill -HUP `cat $PIDFILE` || true
# start-stop-daemon --stop --signal HUP --quiet --oknodo \
# --exec $DAEMON --pidfile $PIDFILE
- echo -n " $NAME"
+ printf " $NAME"
fi
done
echo "."