On Thu, 2016-07-21 at 17:57 +0200, jcsl wrote:
Hi Dominique.
Thanks but I have tried that already. As I wrote in the initial message, if I disable rpcbind.socket or rpcbin.service, it does nothing. And if I mask any of them the system just doesn't boot. On boot it appears a line showing a message with a timer that says that it is waiting for NFS or a related service and gets stuck waiting without a time limit (I waited three minutes). I don't remember the exact words, sorry. In addition the same message appears on all VT, so I couldn't change to another one to login, undo my changes and reboot; I had to reboot on single user mode, undo my changes and reboot again.
Disabling does not work in your case as some other service you start depends on it - so that's correct behaviour (enable/disable only controls if the server starts on its own)
systemctl show rpcbind.socket | grep Wanted outputs this:
WantedBy=nfs-server.service rpcbind.target
And from all the info I gather you of course want nfs-server.
I didn't know that command (thanks), but I got to that file because I saw it when I disabled the rpcbind service or something similar (/etc/systemd/system/ multi-user.target.wants/nfs-server.service is the file that I found indeed).
[Unit] Description=NFS server and services DefaultDependencies=no Requires= network.target proc-fs-nfsd.mount Requires= nfs-mountd.service Wants=rpcbind.socket Wants=rpc-statd.service nfs-idmapd.service Wants=rpc-statd-notify.service
You should be able to duplicate this unit into /etc/systemd/ and adjust the settings to your liking (remove the Wants=rpcbind.socket) Service files in /etc/systemd/ have a higher prio than the ones in /usr/lib/systemd; of course this needs good testing by yourself. Not sure, but I *think* you have to disable, then re-enable the service though to get symlinks properly setup. Cheers, Dominique