dsnap-sync: cosmetic changes

This commit is contained in:
2018-06-25 20:05:53 +02:00
parent 7047775567
commit df8422fa93

View File

@@ -100,7 +100,9 @@ check_prerequisites () {
if [ $(id -u) -ne 0 ] ; then printf "$progname: must be run as root\n" ; exit 1 ; fi if [ $(id -u) -ne 0 ] ; then printf "$progname: must be run as root\n" ; exit 1 ; fi
if [ -z "$remote" ]; then if [ -z "$remote" ]; then
$ssh which sh >/dev/null 2>&1 || { printf "'remote shell' is not working!\nPlease correct your public authentication and try again.\n" && exit 1; } $ssh which sh >/dev/null 2>&1 || \
{ printf "'remote shell' is not working!\n \
Please correct your public authentication and try again.\n" && exit 1; }
fi fi
if [ ! -r "$SNAPPER_CONFIG" ]; then if [ ! -r "$SNAPPER_CONFIG" ]; then
@@ -119,7 +121,7 @@ check_snapper_failed_ids () {
answer="yes" answer="yes"
else else
#printf "\nNOTE: Found %s previous failed sync runs for '%s'.\n" "${snapper_failed_ids}" "$selected_config" | tee $PIPE #printf "\nNOTE: Found %s previous failed sync runs for '%s'.\n" "${snapper_failed_ids}" "$selected_config" | tee $PIPE
printf "\nNOTE: Found %s previous failed sync runs for '%s'.\n" "${snapper_failed_ids}" "$selected_config" printf "${MAGENTA}Found %s previous failed sync runs for '%s'${NO_COLOR}\n" "${snapper_failed_ids}" "$selected_config"
answer=no answer=no
get_answer_yes_no "Delete failed backup snapshots [y/N]? " "$answer" get_answer_yes_no "Delete failed backup snapshots [y/N]? " "$answer"
fi fi
@@ -559,6 +561,7 @@ parse_params () {
. $SNAPPER_CONFIG . $SNAPPER_CONFIG
selected_configs=${selected_configs:-$SNAPPER_CONFIGS} selected_configs=${selected_configs:-$SNAPPER_CONFIGS}
# message-text used for snapper fields
snap_description_finished=${snap_description_finished:-"dsnap-sync backup"} snap_description_finished=${snap_description_finished:-"dsnap-sync backup"}
snap_description_running=${snap_description_running:-"dsnap-sync in progress"} snap_description_running=${snap_description_running:-"dsnap-sync in progress"}
snap_description_synced=${snap_description_synced:-"dsnap-sync last incremental"} snap_description_synced=${snap_description_synced:-"dsnap-sync last incremental"}
@@ -620,7 +623,6 @@ parse_params () {
} }
run_config () { run_config () {
printf "${BLUE}Verify configuration...${NO_COLOR}\n" printf "${BLUE}Verify configuration...${NO_COLOR}\n"
SNAP_SYNC_EXCLUDE=no SNAP_SYNC_EXCLUDE=no