I'd posted this to ubuntu-devel-discuss but I was just looking at systemd-boot bugs and thought that I'd post it here too, with apologies for the duplication. I hope that it helps whoever puts together the real thing.
I installed the upstream nfs-utils units and adapted them with "/etc/" overrides; and I created rpcbind units.
[Note on RPCIDMAPDARGS: I set it to "-p /var/lib/nfs/rpc_pipefs" in
"/etc/default/nfs-common" because nfs-idmapd.service was failing
without it. The path to rpc_pipefs was defaulting to "/run/rpc_pipefs"
even though the man page says that the default is
"/var/lib/nfs/rpc_pipefs".]
[Note on rpcbind.service: I'm not sure whether this is the right unit
or whether it should have "Before=rpcbind.target multi-user.target"
and "Requires=rpcbind.target" in the "Unit" section and
"WantedBy=multi-user.target" in the "Install" section.]
I'd posted this to ubuntu- devel-discuss but I was just looking at systemd-boot bugs and thought that I'd post it here too, with apologies for the duplication. I hope that it helps whoever puts together the real thing.
I installed the upstream nfs-utils units and adapted them with "/etc/" overrides; and I created rpcbind units.
# diff /etc/systemd/ system/ nfs-config. service system/ nfs-config. service /lib/systemd/ scripts/ nfs-utils_ env.sh /usr/lib/ systemd/ scripts/ nfs-utils_ env.sh
/lib/systemd/
7c7
< ExecStart=
---
> ExecStart=
# diff /etc/systemd/ system/ rpc-statd- notify. service system/ rpc-statd- notify. service -/sbin/ sm-notify -d $SMNOTIFYARGS -/usr/sbin/ sm-notify -d $SMNOTIFYARGS
/lib/systemd/
19c19
< ExecStart=
---
> ExecStart=
# diff /etc/systemd/ system/ rpc-statd. service system/ rpc-statd. service /run/rpc. statd.pid /sbin/rpc. statd --no-notify $STATDARGS /var/run/ rpc.statd. pid /usr/sbin/ rpc.statd --no-notify $STATDARGS
/lib/systemd/
16,17c16,17
< PIDFile=
< ExecStart=
---
> PIDFile=
> ExecStart=
# cat /lib/systemd/ scripts/ nfs-utils_ env.sh
#!/bin/sh
NFS_CONFIG= /run/sysconfig/ nfs-utils
if [ -e $NFS_CONFIG ] ; then
rm -f $NFS_CONFIG
fi
if [ -r /etc/default/ nfs-common ] ; then nfs-common
. /etc/default/
fi
if [ -r /etc/default/ nfs-kernel- server ] ; then nfs-kernel- server
. /etc/default/
fi
RPCNFSDARGStmp= "$RPCNFSDCOUNT $RPCNFSDOPTS"
mkdir -p /run/sysconfig
echo "GSSDARGS=\"\"" >> $NFS_CONFIG \"$RPCIDMAPDARG S\"" >> $NFS_CONFIG \"$STATDOPTS\ "" >> $NFS_CONFIG
echo "RPCIDMAPDARGS=
echo "SMNOTIFYARGS=\"\"" >> $NFS_CONFIG
echo "STATDARGS=
echo "RPCMOUNTDARGS= \"$RPCMOUNTDOPT S\"" >> $NFS_CONFIG \"$RPCNFSDARGSt mp\"" >> $NFS_CONFIG \"$RPCSVCGSSDOP TS\"" >> $NFS_CONFIG
echo "RPCNFSDARGS=
echo "SVCGSSDARGS=
[Note on RPCIDMAPDARGS: I set it to "-p /var/lib/ nfs/rpc_ pipefs" in nfs-common" because nfs-idmapd.service was failing nfs/rpc_ pipefs" .]
"/etc/default/
without it. The path to rpc_pipefs was defaulting to "/run/rpc_pipefs"
even though the man page says that the default is
"/var/lib/
# cat /lib/systemd/ system/ rpcbind. service target
[Unit]
Description=RPC Bind
After=network.
[Service] /sbin/rpcbind
Type=forking
ExecStart=
Restart=always
[Install] rpcbind. target
WantedBy=
[Note on rpcbind.service: I'm not sure whether this is the right unit rpcbind. target multi-user.target" rpcbind. target" in the "Unit" section and multi-user. target" in the "Install" section.]
or whether it should have "Before=
and "Requires=
"WantedBy=
# cat /lib/systemd/ system/ rpcbind. socket
[Unit]
Description=RPC Bind Socket
[Socket] /run/rpcbind. sock
ListenStream=
[Install] sockets. target
WantedBy=