package/nfs-utils: making nfs server optional
PATCH v2 1/1 package/nfs-utils: making nfs server optional
This patch makes nfs server component optional. This is useful when only client tools are used and not the nfs server.
---v1->v2: Fixing minor formatting nitpick.
package/nfs-utils/Config.in | 6 ++++++ package/nfs-utils/nfs-utils.mk | 2 ++ 2 files changed, 8 insertions(+)
package/nfs-utils/Config.in +6 -0
@@ -30,4 +30,10 @@ config BR2_PACKAGE_NFS_UTILS_RPC_RQUOTAD help NFS remote quota server +config BR2_PACKAGE_NFS_UTILS_SERVER + bool "server daemon" + default y + help + Install the NFS server daemon + endif
package/nfs-utils/nfs-utils.mk +2 -0
@@ -71,6 +71,7 @@ else NFS_UTILS_CONF_OPTS += --without-systemd endif +ifeq ($(BR2_PACKAGE_NFS_UTILS_SERVER),y) define NFS_UTILS_INSTALL_INIT_SYSV $(INSTALL) -D -m 0755 package/nfs-utils/S60nfs \ $(TARGET_DIR)/etc/init.d/S60nfs
@@ -95,6 +96,7 @@ define NFS_UTILS_INSTALL_INIT_SYSTEMD $(INSTALL) -D -m 0644 package/nfs-utils/nfs-utils_tmpfiles.conf \ $(TARGET_DIR)/usr/lib/tmpfiles.d/nfs-utils.conf endef +endif define NFS_UTILS_REMOVE_NFSIOSTAT rm -f $(TARGET_DIR)/usr/sbin/nfsiostat
Signature · 1 line
2.7.4
PATCH v2 1/1 package/nfs-utils: making nfs server optional
Hello Angelo,
package/nfs-utils/nfs-utils.mk define NFS_UTILS_INSTALL_INIT_SYSTEMD · line 99
Quoted 9 lines · On Thu, 28 Mar 2019 14:53:09 +0100 Angelo Compagnucci…
package/nfs-utils/nfs-utils.mk +2
-0+ifeq ($(BR2_PACKAGE_NFS_UTILS_SERVER),y) define NFS_UTILS_INSTALL_INIT_SYSV $(INSTALL) -D -m 0755 package/nfs-utils/S60nfs \ $(TARGET_DIR)/etc/init.d/S60nfs@@ -95,6 +96,7 @@ define NFS_UTILS_INSTALL_INIT_SYSTEMD $(INSTALL) -D -m 0644 package/nfs-utils/nfs-utils_tmpfiles.conf \ $(TARGET_DIR)/usr/lib/tmpfiles.d/nfs-utils.conf endef +endif
This is only removing the installation of the init script/systemd unit files, not really disabling the server.
Shouldn't we do like BR2_PACKAGE_NFS_UTILS_RPCDEBUG, BR2_PACKAGE_NFS_UTILS_RPC_LOCKD and BR2_PACKAGE_NFS_UTILS_RPC_RQUOTAD are doing, and also remove the unnecessary programs ?
Another question is: the systemd stuff installs a nfs-client.service unit file, and you're no longer installing this. It's named nfs-client... so it seems to be needed even when you are just a client.
In fact, I think *some* of the daemons are needed even when you are just a client. See what nfs-client.service is doing.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v2 1/1 package/nfs-utils: making nfs server optional
Hi Thomas,
Quoted 19 lines · Thomas Petazzoni
Hello Angelo,
package/nfs-utils/nfs-utils.mk define NFS_UTILS_INSTALL_INIT_SYSTEMD · line 99
Quoted 9 lines · On Thu, 28 Mar 2019 14:53:09 +0100 Angelo Compagnucci…
package/nfs-utils/nfs-utils.mk +2
-0+ifeq ($(BR2_PACKAGE_NFS_UTILS_SERVER),y) define NFS_UTILS_INSTALL_INIT_SYSV $(INSTALL) -D -m 0755 package/nfs-utils/S60nfs \ $(TARGET_DIR)/etc/init.d/S60nfs@@ -95,6 +96,7 @@ define NFS_UTILS_INSTALL_INIT_SYSTEMD $(INSTALL) -D -m 0644 package/nfs-utils/nfs-utils_tmpfiles.conf \ $(TARGET_DIR)/usr/lib/tmpfiles.d/nfs-utils.conf endef +endifThis is only removing the installation of the init script/systemd unit files, not really disabling the server.>
Quoted 3 lines
Shouldn't we do like
BR2_PACKAGE_NFS_UTILS_RPCDEBUG,BR2_PACKAGE_NFS_UTILS_RPC_LOCKDandBR2_PACKAGE_NFS_UTILS_RPC_RQUOTADare doing, and also remove the unnecessary programs ?
Probably yes. It could save some space and it coulb be betetr for fs cleaning. Will do.
Quoted 7 lines
Another question is: the systemd stuff installs a nfs-client.service unit file, and you're no longer installing this. It's named nfs-client... so it seems to be needed even when you are just a client.
In fact, I think *some* of the daemons are needed even when you are just a client. See what nfs-client.service is doing.
I'll have a better look at the systemd part. I tested with sysy and the system can mount an nfs share without having any service running.
Quoted 8 lines
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com