diff --git a/handlers/dup.in b/handlers/dup.in index 2a7e85f..d7ad27b 100644 --- a/handlers/dup.in +++ b/handlers/dup.in @@ -314,10 +314,10 @@ if [ ! $test ]; then "$execstr_precmd duplicity cleanup --force $execstr_options $execstr_serverpart 2>&1"` exit_code=$? if [ $exit_code -eq 0 ]; then - debug $output + debug "$output" info "Duplicity cleanup finished successfully." else - debug $output + debug "$output" warning "Duplicity cleanup failed." fi fi @@ -334,10 +334,10 @@ if [ "$keep" != "yes" ]; then "$execstr_precmd duplicity remove-older-than $keep --force $execstr_options $execstr_serverpart 2>&1"` exit_code=$? if [ $exit_code -eq 0 ]; then - debug $output + debug "$output" info "Duplicity remove-older-than finished successfully." else - debug $output + debug "$output" warning "Duplicity remove-older-than failed." fi fi @@ -357,10 +357,10 @@ if [ "$keep" != "yes" ]; then "$execstr_precmd duplicity remove-all-inc-of-but-n-full $keepincroffulls --force $execstr_options $execstr_serverpart 2>&1"` exit_code=$? if [ $exit_code -eq 0 ]; then - debug $output + debug "$output" info "Duplicity remove-all-inc-of-but-n-full finished successfully." else - debug $output + debug "$output" warning "Duplicity remove-all-inc-of-but-n-full failed." fi fi @@ -379,12 +379,12 @@ if [ ! $test ]; then su -c \ "$execstr_precmd duplicity $execstr_command $execstr_options $execstr_source --exclude '**' / $execstr_serverpart >$outputfile 2>&1"` exit_code=$? - debug $output + debug "$output" cat $outputfile | (while read output ; do if [ $exit_code -eq 0 ]; then - info $output + info "$output" else - error $output + error "$output" fi done ) diff --git a/handlers/ldap.in b/handlers/ldap.in index 600f172..cce2cba 100644 --- a/handlers/ldap.in +++ b/handlers/ldap.in @@ -94,10 +94,10 @@ if [ "$ldif" == "yes" ]; then output=`su root -s /bin/bash -c "set -o pipefail ; $execstr" 2>&1` code=$? if [ "$code" == "0" ]; then - debug $output + debug "$output" info "Successfully finished ldif export of $dbsuffix" else - warning $output + warning "$output" warning "Failed ldif export of $dbsuffix" fi diff --git a/handlers/makecd.in b/handlers/makecd.in index d44bba3..a45259e 100644 --- a/handlers/makecd.in +++ b/handlers/makecd.in @@ -51,10 +51,10 @@ debug 0 "echo $execstr " output=` $execstr 2>&1 ` code=$? if [ "$code" == "0" ]; then - debug $output + debug "$output" info "Successfully finished creation of iso" else - warning $output + warning "$output" warning "Failed to create iso" fi @@ -65,10 +65,10 @@ if [ "$isoonly" == "no" ]; then $CDRECORD -v gracetime=2 dev=$device speed=8 -dao -data $outputfile code=$? if [ "$code" == "0" ]; then - debug $output + debug "$output" info "Successfully burned CD" else - warning $output + warning "$output" warning "Failed to create CD" fi fi @@ -77,10 +77,10 @@ if [ "$isoonly" == "no" ]; then $GROWISOFS -speed=2 -Z $device=$outputfile -use-the-force-luke=notray -use-the-force-luke=tty code=$? if [ "$code" == "0" ]; then - debug $output + debug "$output" info "Successfully burned DVD" else - warning $output + warning "$output" warning "Failed to create DVD" fi fi diff --git a/handlers/mysql.in b/handlers/mysql.in index 151d5c0..a719ad6 100644 --- a/handlers/mysql.in +++ b/handlers/mysql.in @@ -194,10 +194,10 @@ then code=$? if [ "$code" == "0" ] then - debug $output + debug "$output" info "Successfully finished hotcopy of all mysql databases" else - warning $output + warning "$output" warning "Failed to hotcopy all mysql databases" fi fi @@ -217,10 +217,10 @@ then code=$? if [ "$code" == "0" ] then - debug $output + debug "$output" info "Successfully finished hotcopy of mysql database $db" else - warning $output + warning "$output" warning "Failed to hotcopy mysql database $db" fi fi @@ -303,10 +303,10 @@ then code=$? if [ "$code" == "0" ] then - debug $output + debug "$output" info "Successfully finished dump of mysql database $db" else - warning $output + warning "$output" warning "Failed to dump mysql databases $db" fi fi diff --git a/handlers/pgsql.in b/handlers/pgsql.in index fc337a0..31a2168 100644 --- a/handlers/pgsql.in +++ b/handlers/pgsql.in @@ -131,10 +131,10 @@ if [ "$databases" == "all" ]; then output=`eval $execstr 2>&1` code=$? if [ "$code" == "0" ]; then - debug $output + debug "$output" info "Successfully finished dump of pgsql cluster" else - warning $output + warning "$output" warning "Failed to dump pgsql cluster" fi fi @@ -161,10 +161,10 @@ else output=`eval $execstr 2>&1` code=$? if [ "$code" == "0" ]; then - debug $output + debug "$output" info "Successfully finished pgsql globals (roles and tablespaces) dump" else - warning $output + warning "$output" warning "Failed to dump pgsql globals (roles and tablespaces)" fi fi @@ -198,10 +198,10 @@ else output=`eval $execstr 2>&1` code=$? if [ "$code" == "0" ]; then - debug $output + debug "$output" info "Successfully finished dump of pgsql database ${db}" else - warning $output + warning "$output" warning "Failed to dump pgsql database ${db}" fi fi diff --git a/handlers/rdiff.in b/handlers/rdiff.in index 471a3d7..2a06d2e 100644 --- a/handlers/rdiff.in +++ b/handlers/rdiff.in @@ -184,13 +184,13 @@ if [ "$keep" != yes ]; then output="`su -c "$removestr" 2>&1`" if [ $? = 0 ]; then if [ "$output_as_info" == "yes" ]; then - info $output + info "$output" else - debug $output + debug "$output" fi info "Removing backups older than $keep days succeeded." else - warning $output + warning "$output" warning "Failed removing backups older than $keep." fi fi @@ -274,13 +274,13 @@ if [ $test = 0 ]; then output=`nice -n $nicelevel su -c "$execstr" 2>&1` if [ $? = 0 ]; then if [ "$output_as_info" == "yes" ]; then - info $output + info "$output" else - debug $output + debug "$output" fi info "Successfully finished backing up source $label" else - error $output + error "$output" fatal "Failed backup up source $label" fi fi diff --git a/handlers/sys.in b/handlers/sys.in index d545719..35b9b6c 100644 --- a/handlers/sys.in +++ b/handlers/sys.in @@ -664,10 +664,10 @@ if [ "$luksheaders" == "yes" ]; then output=`$DD if="${dev}" of="${outputfile}" bs=512 count="${headersize}" 2>&1` exit_code=$? if [ $exit_code -eq 0 ]; then - debug $output + debug "$output" info "The LUKS header of $dev was saved to $outputfile." else - debug $output + debug "$output" fatal "The LUKS header of $dev could not be saved." fi done @@ -720,7 +720,7 @@ function doLvmBackup () { output=`$VGCFGBACKUP --file "${lvmdir}"/'%s' $vg` done exit_code=$? - debug $output + debug "$output" case $exit_code in 0) info "LVM metadata was saved to $lvmdir for volume groups: $vgs"