From 047606c05e2f5d7bb19a4c87726fbb4ae0bdb82a Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 23 Jun 2019 05:00:59 -0400 Subject: [PATCH] Update iiab-diagnostics --- scripts/iiab-diagnostics | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/scripts/iiab-diagnostics b/scripts/iiab-diagnostics index 9adb49fe9..43f770d58 100755 --- a/scripts/iiab-diagnostics +++ b/scripts/iiab-diagnostics @@ -38,15 +38,18 @@ function cat_file_raw() { # $1 = path/filename; $2 = # of lines, for tail tail -$2 $1 | iconv -t UTF-8//IGNORE >> $outfile fi echo >> $outfile + elif [ -h $1 ]; then + ls -l $1 >> $outfile + echo >> $outfile + echo "SYMLINK DOES NOT LEAD TO A REGULAR FILE!" >> $outfile + echo >> $outfile + elif [ -d $1 ]; then + ls -ld $1 >> $outfile + echo >> $outfile + echo "THIS IS A DIRECTORY NOT A FILE!" >> $outfile + echo >> $outfile else - if [ -d $1 ]; then - ls -ld $1 >> $outfile - echo >> $outfile - echo "THIS IS A DIRECTORY NOT A FILE!" >> $outfile - echo >> $outfile - else - echo "FILE DOES NOT EXIST: $1" >> $outfile - fi + echo "FILE DOES NOT EXIST: $1" >> $outfile fi }