From b5dc3816e729892b7fece5dd3c73cff35ca2b0dd Mon Sep 17 00:00:00 2001 From: rootzoll Date: Tue, 27 Nov 2018 05:20:31 +0100 Subject: [PATCH] better automounted detection --- home.admin/_bootstrap.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/home.admin/_bootstrap.sh b/home.admin/_bootstrap.sh index 5d5cdc47d..dd97e5f2f 100644 --- a/home.admin/_bootstrap.sh +++ b/home.admin/_bootstrap.sh @@ -86,8 +86,8 @@ while [ ${hddExists} -eq 0 ] done # check if the HDD is auto-mounted -hddIsAutoMounted=$(ls -la /mnt/hdd 2>/dev/null) -if [ ${#hddIsAutoMounted} -eq 0 ]; then +hddIsAutoMounted=$(lsblk | grep -c '/mnt/hdd') +if [ ${hddIsAutoMounted} -eq 0 ]; then echo "HDD is there but not AutoMounted yet." >> $logFile echo "Analysing the situation ..." >> $logFile