]> git.sesse.net Git - backup.sh/blobdiff - backup.sh
Make the error message when /backup is missing slightly better.
[backup.sh] / backup.sh
index ce6c6d4cac516305b35b52b14c9cc613b5d713ef..bafb1e32997151728cd0289d0c86b452fa37b7d2 100755 (executable)
--- a/backup.sh
+++ b/backup.sh
@@ -70,15 +70,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 +143,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