Skip to contentSkip to conversation

gfs2-utils scripts: Install gfs2_withdraw_helper into $libexecdir

PATCH New Andrew Price 1 participant 1 message Aug 2, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gfs2-utils scripts: Install gfs2_withdraw_helper into $libexecdir

This is a more appropriate location as the helper script isn't meant to be run by users. It also means that various checkers will stop complaining that there is no man page for this script.

The 82-gfs2-withdraw.rules udev hook is now generated from the .in file so that $libexecdir can be substituted into it. The path can be set at configure time.

---
 gfs2/scripts/82-gfs2-withdraw.rules    |  2 --
 gfs2/scripts/82-gfs2-withdraw.rules.in |  2 ++
 gfs2/scripts/Makefile.am               | 11 +++++++++--
 3 files changed, 11 insertions(+), 4 deletions(-)
 delete mode 100644 gfs2/scripts/82-gfs2-withdraw.rules
 create mode 100644 gfs2/scripts/82-gfs2-withdraw.rules.in
gfs2/scripts/82-gfs2-withdraw.rules deleted +0 -2
deleted file mode 100644
index 2c9e0e8a..00000000
@@ -1,2 +0,0 @@
-SUBSYSTEM=="gfs2", ACTION=="offline", RUN+="/bin/sh /usr/sbin/gfs2_withdraw_helper"
-
gfs2/scripts/82-gfs2-withdraw.rules.in new file +2 -0
new file mode 100644
index 00000000..00b30ac2
@@ -0,0 +1,2 @@
+SUBSYSTEM=="gfs2", ACTION=="offline", RUN+="/bin/sh @libexecdir@/gfs2_withdraw_helper"
+
gfs2/scripts/Makefile.am +9 -2
index d4bda04c..47c2966d 100644
@@ -1,10 +1,17 @@
 MAINTAINERCLEANFILES = Makefile.in
+CLEANFILES = 82-gfs2-withdraw.rules
+EXTRA_DIST = 82-gfs2-withdraw.rules.in
 
 dist_sbin_SCRIPTS = \
 	gfs2_lockcapture \
-	gfs2_trace \
+	gfs2_trace
+
+dist_libexec_SCRIPTS = \
 	gfs2_withdraw_helper
 
+82-gfs2-withdraw.rules: 82-gfs2-withdraw.rules.in
+	sed -e 's,[@]libexecdir[@],$(libexecdir),g' $< > $@
+
 udevrulesdir=@udevdir@/rules.d
-dist_udevrules_DATA = \
+udevrules_DATA = \
 	82-gfs2-withdraw.rules
Signature · 1 line
2.17.1