From b78a48917e6f4d344fdf386f7cc80d92637cc742 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 31 Oct 2006 07:58:54 +0100 Subject: [PATCH] [bugfix] Wrong return value check Found by Alexey Maximov --- ccollect.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ccollect.sh b/ccollect.sh index 39f48c0..aecdbf5 100755 --- a/ccollect.sh +++ b/ccollect.sh @@ -269,9 +269,10 @@ while [ "$i" -lt "$no_sources" ]; do if [ -x "$c_pre_exec" ]; then echo "Executing ${c_pre_exec} ..." "$c_pre_exec" + ret=$? echo "Finished ${c_pre_exec}." - if [ $? -ne 0 ]; then + if [ $ret -ne 0 ]; then echo "$c_pre_exec failed, aborting backup." exit 1 fi