Browse Source

(test_root): Append / to ROOT_FS unless it already ends in it.

Sergey Poznyakoff 20 years ago
parent
commit
1992ef9496
1 changed files with 4 additions and 0 deletions
  1. 4 0
      scripts/backup.sh.in

+ 4 - 0
scripts/backup.sh.in

@@ -104,6 +104,10 @@ test_root() {
     if [ ! -w ${ROOT_FS-/} ]; then
     if [ ! -w ${ROOT_FS-/} ]; then
 	bailout "The backup must be run as root or else some files will fail to be dumped."
 	bailout "The backup must be run as root or else some files will fail to be dumped."
     fi
     fi
+    case "${ROOT_FS}" in
+    */)	  ;;
+    *)	  ROOT_FS="${ROOT_FS}/"
+    esac
 }
 }
 
 
 advice() {
 advice() {