package/nfs-utils: making nfs server optional

This patch makes nfs server component optional. This is useful when
only client tools are needed instead of the full nfs server.

Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
This commit is contained in:
Angelo Compagnucci 2019-04-28 11:02:55 +02:00 committed by Arnout Vandecappelle (Essensium/Mind)
parent a64c3a847d
commit 01b656323e
2 changed files with 17 additions and 2 deletions

View File

@ -25,6 +25,12 @@ config BR2_PACKAGE_NFS_UTILS_RPC_LOCKD
help help
NFS lock manager for Linux kernels older than 2.4 NFS lock manager for Linux kernels older than 2.4
config BR2_PACKAGE_NFS_UTILS_RPC_NFSD
bool "rpc.nfsd"
default y
help
NFS server
config BR2_PACKAGE_NFS_UTILS_RPC_RQUOTAD config BR2_PACKAGE_NFS_UTILS_RPC_RQUOTAD
bool "rpc.rquotad" bool "rpc.rquotad"
help help

View File

@ -41,6 +41,8 @@ HOST_NFS_UTILS_DEPENDENCIES = host-pkgconf host-libtirpc
NFS_UTILS_TARGETS_$(BR2_PACKAGE_NFS_UTILS_RPCDEBUG) += usr/sbin/rpcdebug NFS_UTILS_TARGETS_$(BR2_PACKAGE_NFS_UTILS_RPCDEBUG) += usr/sbin/rpcdebug
NFS_UTILS_TARGETS_$(BR2_PACKAGE_NFS_UTILS_RPC_LOCKD) += usr/sbin/rpc.lockd NFS_UTILS_TARGETS_$(BR2_PACKAGE_NFS_UTILS_RPC_LOCKD) += usr/sbin/rpc.lockd
NFS_UTILS_TARGETS_$(BR2_PACKAGE_NFS_UTILS_RPC_RQUOTAD) += usr/sbin/rpc.rquotad NFS_UTILS_TARGETS_$(BR2_PACKAGE_NFS_UTILS_RPC_RQUOTAD) += usr/sbin/rpc.rquotad
NFS_UTILS_TARGETS_$(BR2_PACKAGE_NFS_UTILS_RPC_NFSD) += usr/sbin/exportfs \
usr/sbin/rpc.mountd usr/sbin/rpc.nfsd usr/lib/systemd/system/nfs-server.service
ifeq ($(BR2_PACKAGE_LIBCAP),y) ifeq ($(BR2_PACKAGE_LIBCAP),y)
NFS_UTILS_CONF_OPTS += --enable-caps NFS_UTILS_CONF_OPTS += --enable-caps
@ -71,16 +73,23 @@ else
NFS_UTILS_CONF_OPTS += --without-systemd NFS_UTILS_CONF_OPTS += --without-systemd
endif endif
ifeq ($(BR2_PACKAGE_NFS_UTILS_RPC_NFSD),y)
define NFS_UTILS_INSTALL_INIT_SYSV define NFS_UTILS_INSTALL_INIT_SYSV
$(INSTALL) -D -m 0755 package/nfs-utils/S60nfs \ $(INSTALL) -D -m 0755 package/nfs-utils/S60nfs \
$(TARGET_DIR)/etc/init.d/S60nfs $(TARGET_DIR)/etc/init.d/S60nfs
endef endef
define NFS_UTILS_INSTALL_INIT_SYSTEMD_NFSD
ln -fs ../../../../usr/lib/systemd/system/nfs-server.service \
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/nfs-server.service
endef
endif
define NFS_UTILS_INSTALL_INIT_SYSTEMD define NFS_UTILS_INSTALL_INIT_SYSTEMD
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
ln -fs ../../../../usr/lib/systemd/system/nfs-server.service \ $(NFS_UTILS_INSTALL_INIT_SYSTEMD_NFSD)
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/nfs-server.service
ln -fs ../../../../usr/lib/systemd/system/nfs-client.target \ ln -fs ../../../../usr/lib/systemd/system/nfs-client.target \
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/nfs-client.target $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/nfs-client.target