From 3ace5b33b88909d0b5a129635fedc31ed7d6c56a Mon Sep 17 00:00:00 2001 From: Daniel Kirchner Date: Fri, 6 May 2022 15:24:26 +0200 Subject: [PATCH] #169 fix awk print --- .gitignore | 1 + project/lib/bash/ParallelAction.sh | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 515f1eb..91aff0b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ OLD/ *.old +.idea/ diff --git a/project/lib/bash/ParallelAction.sh b/project/lib/bash/ParallelAction.sh index 5fd40bf..ef44bab 100644 --- a/project/lib/bash/ParallelAction.sh +++ b/project/lib/bash/ParallelAction.sh @@ -78,9 +78,9 @@ function mailbox_backup() ############################################################################### function ldap_restore() { - ldapdelete -r -x -H "$LDAPSERVER" -D "$LDAPADMIN" -c -w "$LDAPPASS" \ - "$(grep ^dn: "$WORKDIR"/"$1"/"$2".ldiff | awk 'print $2')" > /dev/null 2>&1 - ERR=$( (ldapadd -x -H "$LDAPSERVER" -D "$LDAPADMIN" \ + ldapdelete -Z -r -x -H "$LDAPSERVER" -D "$LDAPADMIN" -c -w "$LDAPPASS" \ + "$(grep ^dn: "$WORKDIR"/"$1"/"$2".ldiff | awk '{print $2}')" > /dev/null 2>&1 + ERR=$( (ldapadd -Z -x -H "$LDAPSERVER" -D "$LDAPADMIN" \ -c -w "$LDAPPASS" -f "$WORKDIR"/"$1"/"$2".ldiff) 2>&1) BASHERRCODE=$? if ! [[ $BASHERRCODE -eq 0 ]]; then