tests: use /bin/echo to provide '-e' and elimination of some bashisms

This commit is contained in:
Nikos Mavrogiannopoulos
2015-05-22 06:53:50 +02:00
parent 95ae123a57
commit 96cf2ca674
4 changed files with 11 additions and 10 deletions

View File

@@ -56,14 +56,14 @@ if test ! -z "$QUIT_ON_INIT";then
exit 0
fi
echo -e "testuser" >pass-radius$TMP
$ECHO_E "testuser" >pass-radius$TMP
$OPENCONNECT $IP:$PORT_OCSERV -u test --passwd-on-stdin -v --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --cookieonly < pass-radius$TMP
if test $? = 0;then
echo "Authentication with wrong password succeeded!"
stop
fi
echo -e "test" >pass-radius$TMP
$ECHO_E "test" >pass-radius$TMP
$OPENCONNECT $IP:$PORT_OCSERV -u testuser --passwd-on-stdin -v --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --cookieonly < pass-radius$TMP
if test $? = 0;then
echo "Authentication with wrong username succeeded!"
@@ -71,7 +71,7 @@ if test $? = 0;then
fi
echo "Trying with correct password"
echo -e "test" >pass-radius$TMP
$ECHO_E "test" >pass-radius$TMP
$OPENCONNECT $IP:$PORT_OCSERV -u test --passwd-on-stdin -v --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 < pass-radius$TMP &
PID=$!