We have seen several cases of silent failures in the postinst script due to this construct:
<cmd> | $ERR_LOGGER
This ignores the exit code of <cmd> by default, causing the `set -e` in the script to not catch any errors here.
I suggest to not ignore the exit codes of commands in the pipe:
set -o pipefail
This will make an error in a logged command immediately apparent by aborting the install, rather than failing silently and leaving a broken install.
We have seen several cases of silent failures in the postinst script due to this construct:
<cmd> | $ERR_LOGGER
This ignores the exit code of <cmd> by default, causing the `set -e` in
the script to not catch any errors here.
I suggest to not ignore the exit codes of commands in the pipe:
set -o pipefail
This will make an error in a logged command immediately apparent by aborting
the install, rather than failing silently and leaving a broken install.