Ignore exit code when the first mount fails
This commit is contained in:
parent
8a37b1e742
commit
e103789994
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue