refactoring changes from sequpgrade (endReturn, ...) and some modernizations
This commit is contained in:
@@ -20,7 +20,7 @@ seq_config() {
|
||||
return 0
|
||||
}
|
||||
|
||||
step_1_info() {
|
||||
step_1_info() {
|
||||
echo "Backup root"
|
||||
echoinfo "Essential excludes are provided in the configuration template."
|
||||
echoinfo "(${seq_configTemplate})"
|
||||
@@ -42,7 +42,7 @@ step_1() {
|
||||
step budir / "$buTarget" "${BACKUP_EXCLUDES[@]}" "$@"
|
||||
}
|
||||
|
||||
step_3_info() {
|
||||
step_3_info() {
|
||||
# Backup single directory recursively
|
||||
local opt=
|
||||
local dir='<SOURCE>'
|
||||
@@ -152,15 +152,15 @@ step_3() {
|
||||
if [ $noRemount -eq 0 ]; then
|
||||
# remount target to be writable
|
||||
exep "mount -o rw,remount '${buTarget}' >>/dev/null 2>&1"
|
||||
endReturn -o $? "Remount (${buTarget}) to be writable failed"
|
||||
endReturn "Remount (${buTarget}) to be writable failed"
|
||||
fi
|
||||
|
||||
if [ ! -w "${buTarget}" ] ; then
|
||||
if [ ! -w "${buTarget}" ] ; then
|
||||
error -e "Backup target (${buTarget}) is not writable"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
checkInstalled
|
||||
checkInstalled
|
||||
exep "mv -f ${buTarget}/${buLog}0.log /tmp/${buLog}1.log 2>/dev/null"
|
||||
exep "${sq_toolBin} -avxHAX --delete --info=stats2 ${buExcludes[*]} ${tmpSource} ${tmpTarget} > /tmp/${buLog}0.log"
|
||||
|
||||
|
Reference in New Issue
Block a user