]> git.sesse.net Git - backup.sh/commitdiff
Make the error message when /backup is missing slightly better.
authorSteinar H. Gunderson <sesse@samfundet.no>
Sat, 4 Oct 2014 20:50:30 +0000 (22:50 +0200)
committerSteinar H. Gunderson <sesse@samfundet.no>
Sat, 4 Oct 2014 20:50:30 +0000 (22:50 +0200)
backup.sh

index 1f7031ee3937051eb448bd1deeae68414e3e3211..bafb1e32997151728cd0289d0c86b452fa37b7d2 100755 (executable)
--- a/backup.sh
+++ b/backup.sh
@@ -143,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