diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2012-07-03 14:07:42 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2012-07-03 14:07:42 +0300 |
commit | 919b830afdd005d5b3c5af7004af0d85599e4ae1 (patch) | |
tree | 5284ec6ad29d919bf0ca1972754e9ab4b5f3019d /lib | |
parent | fdab97d3badc7cc48aeadc54a0946e42976e8387 (diff) | |
download | beam-919b830afdd005d5b3c5af7004af0d85599e4ae1.tar.gz beam-919b830afdd005d5b3c5af7004af0d85599e4ae1.tar.bz2 |
Use "logit" instead of "echo".
Diffstat (limited to 'lib')
-rw-r--r-- | lib/beam/common.in | 8 | ||||
-rwxr-xr-x | lib/beam/mysql.sh | 4 | ||||
-rwxr-xr-x | lib/beam/postgres.sh | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/lib/beam/common.in b/lib/beam/common.in index cdb6e7c..6ce25fe 100644 --- a/lib/beam/common.in +++ b/lib/beam/common.in @@ -48,11 +48,11 @@ abend() { tarcode() { case $1 in - 0) echo "`date`: success";; - 1) echo "`date`: some files changed while being archived";; - 2) echo "`date`: fatal error occurred, but trying to continue anyway" + 0) logit "success";; + 1) logit "some files changed while being archived";; + 2) logit "fatal error occurred, but trying to continue anyway" tarerror=$((tarerror + 1));; - *) echo "`date`: unexpected error code $1" + *) logit "unexpected error code $1" tarerror=$((tarerror + 1)); esac } diff --git a/lib/beam/mysql.sh b/lib/beam/mysql.sh index e867690..09b2ef4 100755 --- a/lib/beam/mysql.sh +++ b/lib/beam/mysql.sh @@ -45,9 +45,9 @@ mysql_backup() { if [ $? -ne 0 ]; then tarerror=$((tarerror + 1)) - echo >&2 "`date`: failed" + logit "failed" else - echo "`date`: creating $1-$week-$round-$level.$tar_suffix" + logit "creating $1-$week-$round-$level.$tar_suffix" $dry_run tar $verbose $taroptions \ -f $backup_archive_dir/$1-$week-$round-$level.$tar_suffix \ -C $backup_snapshot_dir $1-$week-$round-$level diff --git a/lib/beam/postgres.sh b/lib/beam/postgres.sh index fc96b3a..f49967e 100755 --- a/lib/beam/postgres.sh +++ b/lib/beam/postgres.sh @@ -37,9 +37,9 @@ postgres_backup() { if [ $? -ne 0 ]; then tarerror=$((tarerror + 1)) - echo >&2 "`date`: failed" + logit "failed" else - echo "`date`: creating $1-$week-$round-$level.$tar_suffix" + logit "creating $1-$week-$round-$level.$tar_suffix" $dry_run tar $verbose $taroptions \ -f $backup_archive_dir/$1-$week-$round-$level.$tar_suffix \ -C $backup_snapshot_dir $1-$week-$round-$level |