From: Sergey Poznyakoff Date: Thu, 3 Mar 2005 23:14:52 +0000 (+0000) Subject: Use `head -n 1'. Provide missing argument to ${MT_STATUS}. Fixed typo in MT_OFFLINE... X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=f04c7701fa16beb215ca4ec2499f41001e6bfd88;p=chaz%2Ftar Use `head -n 1'. Provide missing argument to ${MT_STATUS}. Fixed typo in MT_OFFLINE assignment. Proposed by Jan Merka. --- diff --git a/scripts/backup.sh.in b/scripts/backup.sh.in index 9dd60e7..6daa9b8 100644 --- a/scripts/backup.sh.in +++ b/scripts/backup.sh.in @@ -45,7 +45,7 @@ mt_status() { # The main configuration file may override any of these variables MT_BEGIN=mt_begin MT_REWIND=mt_rewind -MT_OFFLINE=mt_offl +MT_OFFLINE=mt_offline MT_STATUS=mt_status # Insure `mail' is in PATH. @@ -104,12 +104,12 @@ test_root() { if [ ! -w ${ROOT_FS-/} ]; then bailout "The backup must be run as root or else some files will fail to be dumped." fi - case "${ROOT_FS}" in - */) ;; - *) ROOT_FS="${ROOT_FS}/" - esac } +root_fs() { + echo "${ROOT_FS}$1" | tr -s / +} + advice() { echo "Directory $1 is not found." >&2 cat >&2 <