mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
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>
This commit is contained in:
parent
3450dd6a50
commit
e2023e86d5
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -26,8 +26,7 @@ if [ -z "$WINTEST_CONF_DIR" ]; then
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
SOCKET_WRAPPER_DIR=
|
||||
export -n SOCKET_WRAPPER_DIR
|
||||
unset SOCKET_WRAPPER_DIR
|
||||
|
||||
failed=0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user