]> git.sesse.net Git - backup.sh/blobdiff - backup.sh
Remove now-obsolete comment.
[backup.sh] / backup.sh
index ce6c6d4cac516305b35b52b14c9cc613b5d713ef..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
@@ -70,15 +63,6 @@ fi;
 touch $LOCKFILE
 echo $$ > $LOCKFILE
 
-#syntax of remotestat:
-#hostname:/directory/
-remotestatf=$confdir/remotestat
-[ -f $remotestatf ] && remotestat=`cat $remotestatf`
-###
-
-PATH=/local/bin:$PATH:/store/bin
-export PATH
-
 echo `date`": Backup run starting" >&2
 
 umask 027
@@ -152,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