Skip to contentSkip to conversation

Install only needed systemd unit file

PATCH In review Aurélien Chabot 2 participants 2 messages Jul 21, 2015 – Sep 15, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Install only needed systemd unit file

---
 systemd/Makefile.am | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)
systemd/Makefile.am +17 -5
index fbcabb1..0331926 100644
@@ -5,21 +5,33 @@ MAINTAINERCLEANFILES = Makefile.in
 unit_files =  \
     nfs-client.target \
     \
-    auth-rpcgss-module.service \
-    nfs-blkmap.service \
     nfs-config.service \
-    nfs-idmapd.service \
     nfs-mountd.service \
     nfs-server.service \
     nfs-utils.service \
-    rpc-gssd.service \
     rpc-statd-notify.service \
     rpc-statd.service \
-    rpc-svcgssd.service \
     \
     proc-fs-nfsd.mount \
     var-lib-nfs-rpc_pipefs.mount
 
+if CONFIG_NFSV4
+unit_files += \
+    nfs-idmapd.service
+endif
+
+if CONFIG_NFSV41
+unit_files += \
+    nfs-blkmap.service
+endif
+
+if CONFIG_GSS
+unit_files += \
+    auth-rpcgss-module.service \
+    rpc-gssd.service \
+    rpc-svcgssd.service
+endif
+
 EXTRA_DIST = $(unit_files)
 
 unit_dir = /usr/lib/systemd/system
Signature · 1 line
2.4.6
#1 lore raw
Quoted 4 lines · Aurélien Chabot
---
 systemd/Makefile.am | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

Committed....

Note, I also found an issue with the --with-systemd flag which was fixed by:

commit 017164521b94018bd143b879b0e858d98cca83e8

Author: Steve Dickson <[email protected]>
Date:   Tue Sep 15 14:16:42 2015 -0400

configure.ac: with-systemd flag not using default directory

The with-systemd config flag was not using the default directory when a directory was not given

steved.

Quoted 45 lines
systemd/Makefile.am +17 -5
index fbcabb1..0331926 100644
@@ -5,21 +5,33 @@ MAINTAINERCLEANFILES = Makefile.in
 unit_files =  \
     nfs-client.target \
     \
-    auth-rpcgss-module.service \
-    nfs-blkmap.service \
     nfs-config.service \
-    nfs-idmapd.service \
     nfs-mountd.service \
     nfs-server.service \
     nfs-utils.service \
-    rpc-gssd.service \
     rpc-statd-notify.service \
     rpc-statd.service \
-    rpc-svcgssd.service \
     \
     proc-fs-nfsd.mount \
     var-lib-nfs-rpc_pipefs.mount
 
+if CONFIG_NFSV4
+unit_files += \
+    nfs-idmapd.service
+endif
+
+if CONFIG_NFSV41
+unit_files += \
+    nfs-blkmap.service
+endif
+
+if CONFIG_GSS
+unit_files += \
+    auth-rpcgss-module.service \
+    rpc-gssd.service \
+    rpc-svcgssd.service
+endif
+
 EXTRA_DIST = $(unit_files)
 
 unit_dir = /usr/lib/systemd/system