From 1a233ebd85cd8606bad85191c08b7b144525ff72 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 13 Jun 2006 12:08:53 +0200 Subject: [PATCH] Also moved general pre_exec to earlier execution, though not before command line checking --- ccollect.sh | 28 ++++++++++++++-------------- doc/CHANGES | 1 + 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/ccollect.sh b/ccollect.sh index d8e09a1..c851842 100755 --- a/ccollect.sh +++ b/ccollect.sh @@ -128,6 +128,20 @@ if [ "$VERBOSE" = 1 ]; then set -x fi +# +# Look for pre-exec command (general) +# +if [ -x "$CPREEXEC" ]; then + echo "Executing $CPREEXEC ..." + "$CPREEXEC" + echo "Finished ${CPREEXEC}." + + if [ $? -ne 0 ]; then + echo "$CPREEXEC failed, aborting backup." + exit 1 + fi +fi + # # Look, if we should take ALL sources # @@ -164,20 +178,6 @@ fi D_FILE_INTERVAL="$CDEFAULTS/intervals/$INTERVAL" D_INTERVAL=$(cat "$D_FILE_INTERVAL" 2>/dev/null) -# -# Look for pre-exec command (general) -# -if [ -x "$CPREEXEC" ]; then - echo "Executing $CPREEXEC ..." - "$CPREEXEC" - echo "Finished ${CPREEXEC}." - - if [ $? -ne 0 ]; then - echo "$CPREEXEC failed, aborting backup." - exit 1 - fi -fi - # # Let's do the backup # diff --git a/doc/CHANGES b/doc/CHANGES index 785fb1d..bcde1fd 100644 --- a/doc/CHANGES +++ b/doc/CHANGES @@ -2,6 +2,7 @@ * updated documentation * created new document formats: Texinfo and manpage * fixed problem with 'make install' (strip was used) + * fixed possible problem with pre_exec beeing executed to late 0.3.3 to 0.4: * `pax` (Posix) is now required, `cp -al` (GNU specific) is removed