cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Andrew Price <anprice@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH] gfs2-utils scripts: Install gfs2_withdraw_helper into $libexecdir
Date: Thu,  2 Aug 2018 11:09:30 +0100	[thread overview]
Message-ID: <20180802100930.23054-1-anprice@redhat.com> (raw)

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.

Signed-off-by: Andrew Price <anprice@redhat.com>
---
 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

diff --git a/gfs2/scripts/82-gfs2-withdraw.rules b/gfs2/scripts/82-gfs2-withdraw.rules
deleted file mode 100644
index 2c9e0e8a..00000000
--- a/gfs2/scripts/82-gfs2-withdraw.rules
+++ /dev/null
@@ -1,2 +0,0 @@
-SUBSYSTEM=="gfs2", ACTION=="offline", RUN+="/bin/sh /usr/sbin/gfs2_withdraw_helper"
-
diff --git a/gfs2/scripts/82-gfs2-withdraw.rules.in b/gfs2/scripts/82-gfs2-withdraw.rules.in
new file mode 100644
index 00000000..00b30ac2
--- /dev/null
+++ b/gfs2/scripts/82-gfs2-withdraw.rules.in
@@ -0,0 +1,2 @@
+SUBSYSTEM=="gfs2", ACTION=="offline", RUN+="/bin/sh @libexecdir@/gfs2_withdraw_helper"
+
diff --git a/gfs2/scripts/Makefile.am b/gfs2/scripts/Makefile.am
index d4bda04c..47c2966d 100644
--- a/gfs2/scripts/Makefile.am
+++ b/gfs2/scripts/Makefile.am
@@ -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
-- 
2.17.1



                 reply	other threads:[~2018-08-02 10:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180802100930.23054-1-anprice@redhat.com \
    --to=anprice@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).