]> git.sesse.net Git - backup.sh/blobdiff - backup.sh
Remove now-obsolete comment.
[backup.sh] / backup.sh
index 1f7031ee3937051eb448bd1deeae68414e3e3211..366978dd0bfebe73a9021eeecb607af8631fc7a1 100755 (executable)
--- a/backup.sh
+++ b/backup.sh
 # 
 # The script is halfway Norwegian and halfway English. Newer modifications are
 # in English, we should probably stick to that.
-# 
-# Known issues:
-#
-# o $R has no proper meaning because of the forking subshell stuff. We need a
-#   more robust way of returning non-zero on errors, which we probably don't
-#   right now.
-#
 
 # The computer to backup.
 computer=$1
@@ -143,6 +136,10 @@ backup()
 
  # Check that the target filesystem is mounted (actually check that it's not
  # the root filesystem)
+ if [ ! -d "$storagedir/$computer" ]; then
+       echo `date`" $computer: Target filesystem ($storagedir/$computer) does not exist. Aborting"
+       die
+ fi
  rootfilesystem=`df -P /`
  targetfilesystem=`df -P "$storagedir/$computer"`
  if [ "$rootfilesystem" == "$targetfilesystem" ]; then