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