summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorTimur I. Bakeyev <timur@iXsystems.com>2017-12-11 02:47:21 +0100
committerUri Simchoni <uri@samba.org>2018-02-19 07:36:23 +0100
commite2023e86d54be86784a18ccbeced4e2a046c710d (patch)
tree34a01163ae2ec82e8222477adf5d9acd507e53fc /source3
parent3450dd6a50d1d08f49de5ff98f2ce20f31081636 (diff)
downloadsamba-e2023e86d54be86784a18ccbeced4e2a046c710d.tar.gz
Remove some bashisms from the test scripts
Signed-off-by: Timur I. Bakeyev <timur@iXsystems.com> Reviewed-by: Uri Simchoni <uri@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
Diffstat (limited to 'source3')
-rwxr-xr-xsource3/script/smbaddshare4
-rwxr-xr-xsource3/script/smbchangeshare8
-rwxr-xr-xsource3/script/smbdeleteshare2
-rwxr-xr-xsource3/script/tests/test_forceuser_validusers.sh2
-rwxr-xr-xsource3/script/tests/test_smbclient_s3.sh4
5 files changed, 10 insertions, 10 deletions
diff --git a/source3/script/smbaddshare b/source3/script/smbaddshare
index 62f1bdf4f17..704c9f49645 100755
--- a/source3/script/smbaddshare
+++ b/source3/script/smbaddshare
@@ -19,14 +19,14 @@ NETCONF="$BINDIR/net --configfile=$CONF conf"
$NETCONF addshare "$SHARENAME" "$SHAREPATH" writeable=no guest_ok=no "$COMMENT"
RC=$?
-if [[ $RC -ne 0 ]]; then
+if [ $RC -ne 0 ]; then
echo Failure during addshare: rc=$RC
exit $RC
fi
$NETCONF setparm "$SHARENAME" 'max connections' "$MAX_CONN"
RC=$?
-if [[ $RC -ne 0 ]]; then
+if [ $RC -ne 0 ]; then
echo Failure during setparm for max connections: rc=$RC
exit $RC
fi
diff --git a/source3/script/smbchangeshare b/source3/script/smbchangeshare
index 2f3fa3ba3ba..098e9682769 100755
--- a/source3/script/smbchangeshare
+++ b/source3/script/smbchangeshare
@@ -20,28 +20,28 @@ NETCONF="$BINDIR/net --configfile=$CONF conf"
$NETCONF setparm "$SHARENAME" 'path' "$SHAREPATH"
RC=$?
-if [[ $RC -ne 0 ]]; then
+if [ $RC -ne 0 ]; then
echo Failure during setparm for path: rc=$RC
exit $RC
fi
$NETCONF setparm "$SHARENAME" 'comment' "$COMMENT"
RC=$?
-if [[ $RC -ne 0 ]]; then
+if [ $RC -ne 0 ]; then
echo Failed during setparm for comment: rc=$RC
exit $RC
fi
$NETCONF setparm "$SHARENAME" 'max connections' "$MAX_CONN"
RC=$?
-if [[ $RC -ne 0 ]]; then
+if [ $RC -ne 0 ]; then
echo Failure during setparm for max connections: rc=$RC
exit $RC
fi
$NETCONF setparm "$SHARENAME" 'csc policy' "$CSC_POLICY"
RC=$?
-if [[ $RC -ne 0 ]]; then
+if [ $RC -ne 0 ]; then
echo Failure during setparm for csc policy: rc=$RC
exit $RC
fi
diff --git a/source3/script/smbdeleteshare b/source3/script/smbdeleteshare
index 8cd8d1f4c19..8f706789a09 100755
--- a/source3/script/smbdeleteshare
+++ b/source3/script/smbdeleteshare
@@ -15,7 +15,7 @@ SHARENAME="$2"
NETCONF="$BINDIR/net --configfile=$CONF conf"
$NETCONF delshare "$SHARENAME"
RC=$?
-if [[ $RC -ne 0 ]]; then
+if [ $RC -ne 0 ]; then
echo Failure during delshare command: rc=$RC
exit $RC
fi
diff --git a/source3/script/tests/test_forceuser_validusers.sh b/source3/script/tests/test_forceuser_validusers.sh
index 07aa1a56ab5..4b6d66e9fa2 100755
--- a/source3/script/tests/test_forceuser_validusers.sh
+++ b/source3/script/tests/test_forceuser_validusers.sh
@@ -29,7 +29,7 @@ incdir=`dirname $0`/../../../testprogs/blackbox
run_cmd_nooutput() {
CMD="$1"
- out=`eval ${CMD} &> TESTOUT`
+ out=`eval ${CMD} > TESTOUT 2>&1`
if [ $? != 0 ] ; then
cat TESTOUT
rm -f TESTOUT
diff --git a/source3/script/tests/test_smbclient_s3.sh b/source3/script/tests/test_smbclient_s3.sh
index 8017d193812..db77eb12de9 100755
--- a/source3/script/tests/test_smbclient_s3.sh
+++ b/source3/script/tests/test_smbclient_s3.sh
@@ -835,7 +835,7 @@ EOF
echo "$out" | grep 'NT_STATUS'
ret=$?
- if [ $ret == 0 ] ; then
+ if [ $ret = 0 ] ; then
echo "$out"
echo "failed - NT_STATUS_XXXX listing \\manglenames_share\\FF4GBY~Q"
return 1
@@ -971,7 +971,7 @@ EOF
echo "$out" | grep 'NT_STATUS'
ret=$?
- if [ $ret == 0 ] ; then
+ if [ $ret = 0 ] ; then
echo "$out"
echo "failed - NT_STATUS_XXXX listing \\widelinks_share\\dot"
return 1