Also moved general pre_exec to earlier execution, though not before
command line checking
This commit is contained in:
parent
5ef6063fad
commit
1a233ebd85
2 changed files with 15 additions and 14 deletions
28
ccollect.sh
28
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
|
||||
#
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue