Mount fails (because remote machine is off) bash script stops

Hi,

I'm trying to automate a couple of mounts. (I would do this in fstab, but the auto feature causes the virtual machine I'm running in to freeze when it boots up) If the machine I'm trying to connect to is OFF, I get the host unreachable error and then the bash script stops. The problem is that there were other mounts in the script that could execute because the script stopped early when a machine couldn't mount.

Is there a way for the bash script not to stop if it can't mount/connect to a machine?

Thanks,
-J

CentOS release 6.4 (Final)
LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
CentOS release 6.4 (Final)
CentOS release 6.4 (Final)

Try the bg mount option!

1 Like

or &.

bg worked like a charm, I haven't tried &. yet