X-Git-Url: https://arthur.barton.de/gitweb/?a=blobdiff_plain;f=bin%2Fbackup-status;h=092931bb8fbf699c70dc30b403dbb1106c57bda2;hb=9cc923e52039af98307a22382d353af260df5eb7;hp=26cd0cff6c1551b6ad08910f424589b9a892b3cd;hpb=0727c80bea1a549c8d028dd0bff687ffc3c9a6a2;p=backup-script.git diff --git a/bin/backup-status b/bin/backup-status index 26cd0cf..092931b 100755 --- a/bin/backup-status +++ b/bin/backup-status @@ -53,14 +53,14 @@ Check_Stamp() { # $2: padding if [ -f "$1" ]; then - if [ `uname` = "Linux" ]; then + if [ "$(uname)" = "Linux" ]; then last=`LC_ALL=C stat "$1" | grep "^Modify: " \ | cut -d':' -f2- | cut -d. -f1` else last=`LC_ALL=C stat -f "%Sc" "$1"` fi [ -n "$last" ] && echo "$2 - Date:" $last - unset code + code= source "$1" case "$code" in 0) txt=", OK"; ;; @@ -86,7 +86,7 @@ case "$1" in esac if [ $# -ge 1 ]; then - for s in $@; do + for s in "$@"; do if [ ! -r "${conf_d}/$s" ]; then echo "$NAME: Can' read \"${conf_d}/$s\"!" exit 1 @@ -94,7 +94,7 @@ if [ $# -ge 1 ]; then sys="$sys ${conf_d}/$s" done else - sys=${conf_d}/* + sys="${conf_d}/"* fi [ -r "${conf_d}/backup-script.conf" ] && source "${conf_d}/backup-script.conf" @@ -117,10 +117,6 @@ for f in $sys; do # Read in system configuration file source "$f" - # Validate configuration - [ "$system" = "localhost" -o "$system" = "127.0.0.1" ] && local=1 - - destdir="$target" target="$target/$system" [ -d "$target" ] || continue