|
@@ -41,11 +41,38 @@ define NFS_UTILS_INSTALL_FIXUP
|
|
|
endef
|
|
|
NFS_UTILS_POST_INSTALL_TARGET_HOOKS += NFS_UTILS_INSTALL_FIXUP
|
|
|
|
|
|
+ifeq ($(BR2_INIT_SYSTEMD),y)
|
|
|
+NFS_UTILS_CONF_OPTS += --with-systemd=/usr/lib/systemd/system
|
|
|
+NFS_UTILS_DEPENDENCIES += systemd
|
|
|
+else
|
|
|
+NFS_UTILS_CONF_OPTS += --without-systemd
|
|
|
+endif
|
|
|
+
|
|
|
define NFS_UTILS_INSTALL_INIT_SYSV
|
|
|
$(INSTALL) -D -m 0755 package/nfs-utils/S60nfs \
|
|
|
$(TARGET_DIR)/etc/init.d/S60nfs
|
|
|
endef
|
|
|
|
|
|
+define NFS_UTILS_INSTALL_INIT_SYSTEMD
|
|
|
+ mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
|
|
|
+
|
|
|
+ ln -fs ../../../../usr/lib/systemd/system/nfs-server.service \
|
|
|
+ $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/nfs-server.service
|
|
|
+ ln -fs ../../../../usr/lib/systemd/system/nfs-client.target \
|
|
|
+ $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/nfs-client.target
|
|
|
+
|
|
|
+ mkdir -p $(TARGET_DIR)/etc/systemd/system/remote-fs.target.wants
|
|
|
+
|
|
|
+ ln -fs ../../../../usr/lib/systemd/system/nfs-client.target \
|
|
|
+ $(TARGET_DIR)/etc/systemd/system/remote-fs.target.wants/nfs-client.target
|
|
|
+
|
|
|
+ $(INSTALL) -D -m 0755 package/nfs-utils/nfs-utils_env.sh \
|
|
|
+ $(TARGET_DIR)/usr/lib/systemd/scripts/nfs-utils_env.sh
|
|
|
+
|
|
|
+ $(INSTALL) -D -m 0644 package/nfs-utils/nfs-utils_tmpfiles.conf \
|
|
|
+ $(TARGET_DIR)/usr/lib/tmpfiles.d/nfs-utils.conf
|
|
|
+endef
|
|
|
+
|
|
|
define NFS_UTILS_REMOVE_NFSIOSTAT
|
|
|
rm -f $(TARGET_DIR)/usr/sbin/nfsiostat
|
|
|
endef
|