2023-07-28 16:42:19

by Andreas Hasenack

[permalink] [raw]
Subject: [PATCH 2/2] Use the generated units instead of static ones

Use the generated rpc_pipefs target and mount units instead of the
static ones. The rpc-pipefs generator will take care of generating them.

Signed-off-by: Andreas Hasenack <[email protected]>
---
configure.ac | 8 +-------
systemd/Makefile.am | 5 -----
systemd/rpc_pipefs.target | 3 ---
systemd/rpc_pipefs.target.in | 3 ---
systemd/var-lib-nfs-rpc_pipefs.mount | 10 ----------
systemd/var-lib-nfs-rpc_pipefs.mount.in | 10 ----------
6 files changed, 1 insertion(+), 38 deletions(-)
delete mode 100644 systemd/rpc_pipefs.target
delete mode 100644 systemd/rpc_pipefs.target.in
delete mode 100644 systemd/var-lib-nfs-rpc_pipefs.mount
delete mode 100644 systemd/var-lib-nfs-rpc_pipefs.mount.in

diff --git a/configure.ac b/configure.ac
index 6fbcb974..13f3dc75 100644
--- a/configure.ac
+++ b/configure.ac
@@ -681,11 +681,7 @@ AC_CONFIG_COMMANDS_PRE([eval eval _sysconfdir=$sysconfdir])
AC_SUBST([_statedir])
AC_CONFIG_COMMANDS_PRE([eval eval _statedir=$statedir])

-if test "$statedir" = "/var/lib/nfs"; then
- rpc_pipefsmount="var-lib-nfs-rpc_pipefs.mount"
-else
- rpc_pipefsmount="$(systemd-escape -p "$statedir/rpc_pipefs").mount"
-fi
+rpc_pipefsmount="$(systemd-escape -p "$statedir/rpc_pipefs").mount"
AC_SUBST(rpc_pipefsmount)

# make _rpc_pipefsmount available for substitution in config files
@@ -696,8 +692,6 @@ AC_CONFIG_COMMANDS_PRE([eval eval
_rpc_pipefsmount=$rpc_pipefsmount])
AC_CONFIG_FILES([
Makefile
systemd/rpc-gssd.service
- systemd/rpc_pipefs.target
- systemd/var-lib-nfs-rpc_pipefs.mount
linux-nfs/Makefile
support/Makefile
support/export/Makefile
diff --git a/systemd/Makefile.am b/systemd/Makefile.am
index b4483222..1778f988 100644
--- a/systemd/Makefile.am
+++ b/systemd/Makefile.am
@@ -7,7 +7,6 @@ udev_files = 60-nfs.rules

unit_files = \
nfs-client.target \
- rpc_pipefs.target \
\
nfs-mountd.service \
nfs-server.service \
@@ -18,9 +17,6 @@ unit_files = \
proc-fs-nfsd.mount \
fsidd.service

-rpc_pipefs_mount_file = \
- var-lib-nfs-rpc_pipefs.mount
-
if CONFIG_NFSV4
unit_files += \
nfs-idmapd.service
@@ -82,7 +78,6 @@ genexec_PROGRAMS = nfs-server-generator rpc-pipefs-generator
install-data-hook: $(unit_files) $(udev_files)
mkdir -p $(DESTDIR)/$(unitdir)
cp $(unit_files) $(DESTDIR)/$(unitdir)
- cp $(rpc_pipefs_mount_file) $(DESTDIR)/$(unitdir)/$(rpc_pipefsmount)
mkdir -p $(DESTDIR)/$(udev_rulesdir)
cp $(udev_files) $(DESTDIR)/$(udev_rulesdir)
endif
diff --git a/systemd/rpc_pipefs.target b/systemd/rpc_pipefs.target
deleted file mode 100644
index 01d4d278..00000000
--- a/systemd/rpc_pipefs.target
+++ /dev/null
@@ -1,3 +0,0 @@
-[Unit]
-Requires=var-lib-nfs-rpc_pipefs.mount
-After=var-lib-nfs-rpc_pipefs.mount
diff --git a/systemd/rpc_pipefs.target.in b/systemd/rpc_pipefs.target.in
deleted file mode 100644
index 332f62b6..00000000
--- a/systemd/rpc_pipefs.target.in
+++ /dev/null
@@ -1,3 +0,0 @@
-[Unit]
-Requires=@_rpc_pipefsmount@
-After=@_rpc_pipefsmount@
diff --git a/systemd/var-lib-nfs-rpc_pipefs.mount
b/systemd/var-lib-nfs-rpc_pipefs.mount
deleted file mode 100644
index 26d1c763..00000000
--- a/systemd/var-lib-nfs-rpc_pipefs.mount
+++ /dev/null
@@ -1,10 +0,0 @@
-[Unit]
-Description=RPC Pipe File System
-DefaultDependencies=no
-After=systemd-tmpfiles-setup.service
-Conflicts=umount.target
-
-[Mount]
-What=sunrpc
-Where=/var/lib/nfs/rpc_pipefs
-Type=rpc_pipefs
diff --git a/systemd/var-lib-nfs-rpc_pipefs.mount.in
b/systemd/var-lib-nfs-rpc_pipefs.mount.in
deleted file mode 100644
index 4c5d6ce4..00000000
--- a/systemd/var-lib-nfs-rpc_pipefs.mount.in
+++ /dev/null
@@ -1,10 +0,0 @@
-[Unit]
-Description=RPC Pipe File System
-DefaultDependencies=no
-After=systemd-tmpfiles-setup.service
-Conflicts=umount.target
-
-[Mount]
-What=sunrpc
-Where=@_statedir@/rpc_pipefs
-Type=rpc_pipefs
--
2.39.2