summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-09-08 04:35:41 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:17:55 -0500
commitcaa4bfce7c2e152bcdf95878677913987af70cbd (patch)
treee340fddad34adffbb84b686c325b7a0edcc941ff /source4
parent8d21ad6c25d1298d3a682077a2080571ccb70030 (diff)
downloadsamba-caa4bfce7c2e152bcdf95878677913987af70cbd.tar.gz
samba-caa4bfce7c2e152bcdf95878677913987af70cbd.tar.bz2
samba-caa4bfce7c2e152bcdf95878677913987af70cbd.zip
r18247: more shell portability fixes
(This used to be commit d9ddfdf9e86295224dd42c0ab1aa954111ede588)
Diffstat (limited to 'source4')
-rwxr-xr-xsource4/script/tests/mktestsetup.sh12
-rwxr-xr-xsource4/script/tests/selftest.sh4
-rwxr-xr-xsource4/script/tests/test_cifsdd.sh3
3 files changed, 9 insertions, 10 deletions
diff --git a/source4/script/tests/mktestsetup.sh b/source4/script/tests/mktestsetup.sh
index f21d0a2354..a482f62a40 100755
--- a/source4/script/tests/mktestsetup.sh
+++ b/source4/script/tests/mktestsetup.sh
@@ -331,22 +331,22 @@ MODCONF=$LDAPDIR/modules.conf
rm -f $MODCONF
touch $MODCONF
-if ! slaptest -u -f $SLAPD_CONF > /dev/null 2>&1; then
+slaptest -u -f $SLAPD_CONF > /dev/null 2>&1 || {
echo "enabling slapd modules"
cat > $MODCONF <<EOF
modulepath /usr/lib/ldap
moduleload back_bdb
EOF
-fi
+}
if slaptest -u -f $SLAPD_CONF; then
- if ! slapadd -f $SLAPD_CONF < $PRIVATEDIR/$DNSNAME.ldif; then
+ slapadd -f $SLAPD_CONF < $PRIVATEDIR/$DNSNAME.ldif || {
echo "slapadd failed"
- fi
+ }
- if ! slaptest -f $SLAPD_CONF; then
+ slaptest -f $SLAPD_CONF || {
echo "slaptest after database load failed"
- fi
+ }
fi
PATH=$OLDPATH
diff --git a/source4/script/tests/selftest.sh b/source4/script/tests/selftest.sh
index b09399f032..7ba5b5c897 100755
--- a/source4/script/tests/selftest.sh
+++ b/source4/script/tests/selftest.sh
@@ -58,10 +58,10 @@ incdir=`dirname $ARG0`
if [ x"$TEST_LDAP" = x"yes" ]; then
slapd_start
echo -n "LDAP PROVISIONING..."
- if ! $srcdir/bin/smbscript $srcdir/setup/provision $PROVISION_OPTIONS --ldap-backend=$LDAPI; then
+ $srcdir/bin/smbscript $srcdir/setup/provision $PROVISION_OPTIONS --ldap-backend=$LDAPI || {
echo "LDAP PROVISIONING failed: $srcdir/bin/smbscript $srcdir/setup/provision $PROVISION_OPTIONS --ldap-backend=$LDAPI"
exit 1;
- fi
+ }
fi
SMBD_TEST_FIFO="$PREFIX/smbd_test.fifo"
diff --git a/source4/script/tests/test_cifsdd.sh b/source4/script/tests/test_cifsdd.sh
index bb73202162..45c1b1c04a 100755
--- a/source4/script/tests/test_cifsdd.sh
+++ b/source4/script/tests/test_cifsdd.sh
@@ -37,8 +37,7 @@ compare() {
if [ -r $1 -a -r $2 ] ; then
sum1=`sum $1`
sum2=`sum $2`
-
- [[ x"$sum1" = x"$sum2" ]]
+ test "$sum1" = "$sum2"
else
false
fi