Miscellaneous systemd changes (v2)
Subsystems (2)
cover Miscellaneous systemd changes (v2)
v2:
* Corrected the numerous BindTo typos
Here are a few systemd changes that were suggested by the systemd folks:
* Bind the nfs-idmap service to the nfs server.
* Correctly bind nfs-mountd service to the nfs server.
* Used approved way to check if systemd is install and running
Steve Dickson (3):
systemd: Bind rpc.idmapd to the nfs-server service
systemd: Bind the nfs-mountd service to the nfs-server service
start-statd: Use the canonical to check if systemd is running.
systemd/nfs-idmapd.service | 2 +- systemd/nfs-mountd.service | 3 +-- utils/statd/start-statd | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-)
Signature · 1 line
2.1.0
PATCH 1/3 systemd: Bind rpc.idmapd to the nfs-server service
Since rpc.idmapd is only used by the nfs server, to do its id mapping, bind the rpc-idmapd service to the nfs-server service so rpc.idmapd will started and stopped with the server.
--- systemd/nfs-idmapd.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
systemd/nfs-idmapd.service +1 -1
@@ -1,7 +1,7 @@ [Unit] Description=NFSv4 ID-name mapping service -PartOf=nfs-utils.service +BindsTo=nfs-server.service Wants=nfs-config.service After=nfs-config.service
Signature · 1 line
2.1.0
PATCH 2/3 systemd: Bind the nfs-mountd service to the nfs-server service
In reply to Steve DicksonUse BindsTo, instead of PartOf, to bind the rpc-mountd service to the nfs-server service. Its a much tighter bind than PartOf.
The Partof=nfs-utils.service was not needed.
One side effect of this tighter bond is when rpc.mountd is stop, that will also bring the nfs server down as well, due to the Requires=nfs-mountd.service in the nfs-server service
--- systemd/nfs-mountd.service | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
systemd/nfs-mountd.service +1 -2
@@ -3,8 +3,7 @@ Description=NFS Mount Daemon Requires=proc-fs-nfsd.mount After=proc-fs-nfsd.mount After=network.target -PartOf=nfs-server.service -PartOf=nfs-utils.service +BindsTo=nfs-server.service Wants=nfs-config.service After=nfs-config.service
Signature · 1 line
2.1.0
PATCH 3/3 start-statd: Use the canonical to check if systemd is running.
In reply to Steve DicksonUse the approved way, define in
http://www.freedesktop.org/software/systemd/man/sd_booted.html
to check if systemd is installed and running
--- utils/statd/start-statd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
utils/statd/start-statd +1 -1
@@ -7,7 +7,7 @@ PATH="/sbin:/usr/sbin:/bin:/usr/bin" # First try systemd if it's installed. -if systemctl --help >/dev/null 2>&1; then +if test -d /run/systemd/system; then # Quit only if the call worked. systemctl start rpc-statd.service && exit fi
Signature · 1 line
2.1.0
Quoted 15 lines · Steve Dickson
v2:
* Corrected the numerous BindTo typosHere are a few systemd changes that were suggested by the systemd folks:
* Bind the nfs-idmap service to the nfs server.
* Correctly bind nfs-mountd service to the nfs server.
* Used approved way to check if systemd is install and runningSteve Dickson (3):
systemd: Bind rpc.idmapd to the nfs-server service
systemd: Bind the nfs-mountd service to the nfs-server service
start-statd: Use the canonical to check if systemd is running.
Quoted 5 lines
systemd/nfs-idmapd.service | 2 +- systemd/nfs-mountd.service | 3 +-- utils/statd/start-statd | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-)
All three committed....
steved.