Tiny Core Linux

Tiny Core Base => TCB Talk => Topic started by: Misalf on November 28, 2016, 05:37:11 PM

Title: filetool.sh - if [ -s /tmp/backup_status ] output error message
Post by: Misalf on November 28, 2016, 05:37:11 PM
I have files listed in  /opt/.filetool.lst  which aren't always present, so  filetool.sh  often finishes with  exit 1 .
The thing is that, in CLI, as opposed to when running backup from exittc, there is no error message.
That's fine for me, but users not familiar with Core might miss the fact that they might have misconfigured their backup.

Maybe this might be useful?
Code: [Select]
-    [ -s /tmp/backup_status ] && exit 1
+    [ -s /tmp/backup_status ] && { echo -e "\nErrors occoured. See /tmp/backup_status" ; exit 1 ; }

.diff attached.
Also removed some white spaces.