diff options
author | Michael Weiser <michael.weiser@gmx.de> | 2019-02-27 13:07:54 +0000 |
---|---|---|
committer | Michael Weiser <michael.weiser@gmx.de> | 2019-02-28 15:10:58 +0000 |
commit | 13ae94695852169a06207a9e1380f9f2ef836e21 (patch) | |
tree | 827afd64f49f35a139a74d3574c1a61e31061b5c /laps.spec | |
parent | Do not trap SIGCHLD for dash compatibility (diff) | |
download | laps-13ae94695852169a06207a9e1380f9f2ef836e21.tar.gz laps-13ae94695852169a06207a9e1380f9f2ef836e21.tar.bz2 laps-13ae94695852169a06207a9e1380f9f2ef836e21.zip |
Capture and handle ldapsearch error
Since the value of $? survives command substitution and variable
assignment, we can capture and evaluate it. The next hurdle is that
by default only the return code of the last command in a pipe is
returned which is an awk in our case that will always succeed
because it'll just get no input if ldapsearch fails. This can be
worked around using shell option pipefail but this is a bashism. Instead
we go the route of writing it to a temporary file in a group command as
elsewhere in the code.
Diffstat (limited to 'laps.spec')
0 files changed, 0 insertions, 0 deletions