From dc2f6bebb7369194f903d5cf70ba212c470c79bd Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sat, 4 Oct 2014 22:50:30 +0200 Subject: [PATCH] Make the error message when /backup is missing slightly better. --- backup.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backup.sh b/backup.sh index 1f7031e..bafb1e3 100755 --- 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 -- 2.39.2