Wait for Network Ping for fstab mount
There are cases where it is absolute requirement to have working networking to be able to mount a remote folder. CIFS mounts are examples of that, even more so when a virtual bridge is involved since they appear to take longer to be available and working (either that or systemd services may not be properly waiting for it to be ready before continuing).
The steps below will create a new systemd service that can be set as required service to be active (here we will ping a certain local IP) before attempting to mount that folder.
/etc/systemd/system/wait-for-ping.servicefile with the following contents. The
10.0.0.1can be replaced with any IP address, even public ones if you need to wait for the internet to be reachable.
Reload systemctl config files
Enable and start (with the
--nowflag) our new service.
x-systemd.after=wait-for-ping.servicein the mount options to entries of your choosing. For example, for a CIFS mount this would look like this: