From: Sergey Poznyakoff Date: Thu, 19 Aug 2004 13:09:16 +0000 (+0000) Subject: (test_root): Append / to ROOT_FS unless it already ends in it. X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Ftar;a=commitdiff_plain;h=1992ef949691a9df800cfb9e1e7a894126a87177 (test_root): Append / to ROOT_FS unless it already ends in it. --- diff --git a/scripts/backup.sh.in b/scripts/backup.sh.in index e78c326..9dd60e7 100644 --- a/scripts/backup.sh.in +++ b/scripts/backup.sh.in @@ -104,6 +104,10 @@ 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 } advice() {