check mount on error output

This commit is contained in:
rootzoll 2020-01-15 11:01:24 +01:00
parent 763eba6891
commit d7fc22dd8a

View file

@ -119,7 +119,8 @@ if [ "$1" = "status" ]; then
# temp mount data drive
sudo mkdir -p /mnt/hdd
sudo mount /dev/${hdd}1 /mnt/hdd
errorOutput=$(sudo mount /dev/${hdd}1 /mnt/hdd 2>&1 >/dev/null)
echo "errorOutput='${errorOutput}'"
isTempMounted=$(df | grep /mnt/hdd | grep -c ${hdd})
if [ ${isTempMounted} -eq 0 ]; then