Env: Kubuntu-20.04.4, nfs-common-1.3.4(apt upgraded).
I have three NFS mounting entries in /etc/fstab
that depends on a VPN connection.
Only once the VPN come up, these entries can be mounted successfully.
But when booting the system always tries to mount them without VPN, and waits for a timeout, so that results every booting waste a long time.
I know that if I remove these mounting entries from /etc/fstab
, they would NOT be mounted at boot. But there are a lot of text in fstab for them about NFS configurations, I don't want to input those text manually every time.
Further more, I want to they can be mounted automatically after the VPN comes up, and unmounted quietly when the VPN comes down to prevent from waiting a long time when poweroff.
I have made a systemd service unit to manage the VPN connection, and it works fine.
How to get the NFS mounts work as my expectation?