From: Eric Bollengier Date: Fri, 4 Sep 2020 11:33:32 +0000 (+0200) Subject: BEE Backport regress/scripts/bpipe-error-restore.sh X-Git-Tag: Release-11.3.2~1102 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32125029cedb7a6af170d1968f922b1d2e1e0bc5;p=thirdparty%2Fbacula.git BEE Backport regress/scripts/bpipe-error-restore.sh This commit is the result of the squash of the following main commits: Author: Eric Bollengier Date: Thu Jul 12 15:48:28 2018 +0200 regress: Add bpipe2-test to check stderr handling --- diff --git a/regress/scripts/bpipe-error-restore.sh b/regress/scripts/bpipe-error-restore.sh new file mode 100755 index 000000000..580c77f14 --- /dev/null +++ b/regress/scripts/bpipe-error-restore.sh @@ -0,0 +1,24 @@ +#/bin/sh + +echo "This is a message for Bacula" >&2 + +# restore mode +if [ $# -gt 0 ]; then + echo "This is an informative message" + read a + read b + echo "This is an error message" >&2 + read c + sleep 2 + echo $a + echo $b + echo $c + echo "Last line for Bacula" >&2 + exit $1 +else + echo 1 + echo 2 + echo "An other line for Bacula" >&2 + echo 3 + exit 0 +fi