]> Dogcows Code - chaz/tar/commitdiff
(test_root): Append / to ROOT_FS unless it already ends in it.
authorSergey Poznyakoff <gray@gnu.org.ua>
Thu, 19 Aug 2004 13:09:16 +0000 (13:09 +0000)
committerSergey Poznyakoff <gray@gnu.org.ua>
Thu, 19 Aug 2004 13:09:16 +0000 (13:09 +0000)
scripts/backup.sh.in

index e78c3268d73f43b1ecafdb0a3456975978337c34..9dd60e7e30f646642c80f1b9fc2e559cbfbd1077 100644 (file)
@@ -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() {
This page took 0.020928 seconds and 4 git commands to generate.