]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9931 test scripts: fix BSD vs GNU date syntax
authorHoward Chu <hyc@openldap.org>
Tue, 11 Oct 2022 16:03:34 +0000 (17:03 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Thu, 13 Oct 2022 16:00:56 +0000 (16:00 +0000)
tests/scripts/lloadd-all

index d5315341643515fda309dc70eee2548b154add60..ef1dba1ef801029158b04fdee6a822103f03b5bb 100755 (executable)
@@ -25,6 +25,15 @@ FAILCOUNT=0
 SKIPCOUNT=0
 SLEEPTIME=10
 
+# check for BSD vs GNU date
+date -j >/dev/null 2>&1
+RC=$?
+if [ $RC -ne 0 ]; then
+       DATEOPT="-d @"
+else
+       DATEOPT="-r "
+fi
+
 echo ">>>>> Executing all LDAP tests for the Load Balancer"
 
 if [ -n "$NOEXIT" ]; then