Linux verifique se o dir está montado

if mountpoint -q -- "$dir"; then
  printf '%s\n' "$dir is a mount point"
fi
Modern Mamba