On my Raspbian (based on Debian Jessie), I need to start at boot rpcbind
and nfs-common
services because I need them to start autofs
at boot for a NFS mount.
Since Debian Jessie now has moved to systemd
, I want to know the best way to start those 3 services (rpcbind, nfs-commond, autofs) in the correct order to avoid issues.
If I manually mount the NFS share it works. And it also works when using the autofs service with rpcbind and nfs-common already up and running.
autofs uses a systemd unit script. About the other 2 services, should I make init.d scripts or do I have to create systemd unit files? How can I write them?
Best Answer
The reason for the problem is the lack of systemd configuration files. Base on a post by Matt Grant on
debian-devel
these are the steps you need to perform.1. Create
/etc/systemd/system/nfs-common.service
2. Create
/etc/systemd/system/rpcbind.service
3. Create
/etc/tmpfiles.d/rpcbind.conf
4. Configure the services to run at startup