Ignore exit code when the first mount fails

This commit is contained in:
Michael Vines 2019-10-25 10:11:32 -07:00
parent 8a37b1e742
commit e103789994
No known key found for this signature in database
GPG Key ID: 33F4FDEC4E0E88BD
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@ disk=sdb
if ! lsblk | grep -q ${disk} ; then
echo "${disk} does not exist"
else
sudo mount /dev/"$disk" "$mount_point"
sudo mount /dev/"$disk" "$mount_point" || true
if mount | grep -q ${disk} ; then
echo "${disk} is mounted"
else