From 1992ef949691a9df800cfb9e1e7a894126a87177 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Thu, 19 Aug 2004 13:09:16 +0000 Subject: [PATCH] (test_root): Append / to ROOT_FS unless it already ends in it. --- scripts/backup.sh.in | 4 ++++ 1 file changed, 4 insertions(+) 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() { -- 2.44.0