Skip to content

Commit

Permalink
Remove statd
Browse files Browse the repository at this point in the history
  • Loading branch information
donald committed Jan 16, 2019
1 parent ce9e4c7 commit d6f0eb5
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions scripts/update-nfs-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,20 @@ bee install keyutils-1.5.11-0.x86_64
bee install libtirpc-1.1.4-0.x86_64
bee update nfs-utils-2.3.3-0.x86_64

# Remove portmap.service dependencies from nis,stats,nfsd service unit files.
# These three files are currently neither installed with bee nor
# Remove statd.service
# This service is not required for nfsv4
# The service file is currently neither installed with bee nor
# part of mxtools, so just remove it.
#
systemctl disable statd.service
rm /etc/systemd/system/statd.service

# Remove portmap.service dependencies from nis and nfsd service unit files.
# These files are currently neither installed with bee nor
# part of mxtools, so just replace.
#
# Also remove dependency on statd.service.
#
# 'portmap.service' is removed from Requires= and After= lines.
#
# We don't need new dependencies for rpcbind, because this is socket
Expand All @@ -40,28 +50,15 @@ ExecStartPre=/usr/bin/domainname molgen
ExecStart=/usr/sbin/ypbind -foreground
Restart=always
[Install]
WantedBy=multi-user.target
_EOF_
cat << '_EOF_' >/etc/systemd/system/statd.service
[Unit]
Description=NSM Daemon
Requires=network.target local-fs.target
After=network.target local-fs.target
[Service]
ExecStart=/usr/sbin/rpc.statd --foreground
Restart=always
[Install]
WantedBy=multi-user.target
_EOF_
cat << '_EOF_' >/etc/systemd/system/nfsd.service
[Unit]
Description=NFS Daemon
ConditionPathExists=/etc/exports
Requires=statd.service local-fs.target proc-fs-nfsd.mount var-lib-nfs-rpc_pipefs.mount
After=statd.service local-fs.target proc-fs-nfsd.mount var-lib-nfs-rpc_pipefs.mount
Requires=local-fs.target proc-fs-nfsd.mount var-lib-nfs-rpc_pipefs.mount
After=local-fs.target proc-fs-nfsd.mount var-lib-nfs-rpc_pipefs.mount
[Service]
ExecStartPre=/bin/mkdir -p /var/lib/nfs/v4recovery
Expand Down Expand Up @@ -97,6 +94,7 @@ systemctl enable rpcbind.socket
systemctl daemon-reload
systemctl restart systemd-logind.service # maybe still required after daemon-reload

systemctl stop statd.service
systemctl stop nfsd.service
systemctl stop nis.service
systemctl stop portmap.service
Expand Down

0 comments on commit d6f0eb5

Please sign in to comment.