Skip to content

Commit

Permalink
Add nfsd.service
Browse files Browse the repository at this point in the history
The file nfsd.service is currenty untracked.

Import it into mxtools. This is preferred to the option of including it
in the nfs_tools bee package, because it contains local configuration
(e.g. the number 64 for the nproc argument) and we don't want to rebuild
the bee package because of small configuration changes.

Also add file to install script.
  • Loading branch information
donald committed Feb 7, 2019
1 parent af63ad2 commit 22dadd8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,5 @@ install_exec fon/fon.sh "$DESTDIR$usr_bindir/fo
install_exec nfsdtop/nfsdtop "$DESTDIR$usr_sbindir/nfsdtop"
install_data serial-log/serial-log\@.service "$DESTDIR$systemdunitdir/serial-log@.service"
install_exec serial-log/serial-log "$DESTDIR$usr_exec_prefix/libexec/serial-log"
install_data misc_systemd_units/nfsd.service "$DESTDIR$systemdunitdir/nfsd.service"
exit
17 changes: 17 additions & 0 deletions misc_systemd_units/nfsd.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[Unit]
Description=NFS Daemon
ConditionPathExists=/etc/exports
Requires=local-fs.target proc-fs-nfsd.mount var-lib-nfs-rpc_pipefs.mount unbound.service
After=local-fs.target proc-fs-nfsd.mount var-lib-nfs-rpc_pipefs.mount unbound.service

[Service]
ExecStartPre=/bin/mkdir -p /var/lib/nfs/v4recovery
ExecStartPre=/usr/sbin/exportfs -ra
ExecStart=/usr/sbin/rpc.mountd --foreground --manage-gids
ExecStartPost=/usr/sbin/rpc.nfsd -N 3 64 ; /usr/sbin/sm-notify
ExecReload=/usr/sbin/exportfs -ra
ExecStopPost=/usr/sbin/rpc.nfsd 0 ; /usr/sbin/exportfs -ua
Restart=always

[Install]
WantedBy=multi-user.target

0 comments on commit 22dadd8

Please sign in to comment.