unit

Adding a dependency into upstream-supplied systemd units

I recently restarted all my VMs at once and found that several managed to start services before they finished mounting their NFS shares. These shares back apache virtualhosts, mysql databases, and ultimately left several services in non-functional states. Systemd has the ability to depend on services (Requires=, and others) as well as filesystems (RequiresMountsFor=). However, I don’t want to modify or replace the .service files installed from the package. I’d have to manually reconcile changes during updates, and it just generally isn’t nice.