From: Andrew Price <anprice@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 3/3] scripts: install the withdraw udev rules script
Date: Wed, 19 Aug 2015 12:55:09 +0100 [thread overview]
Message-ID: <1439985309-6969-4-git-send-email-anprice@redhat.com> (raw)
In-Reply-To: <1439985309-6969-1-git-send-email-anprice@redhat.com>
Add a --with-udevdir configure option and default to $prefix/lib/udev.
Note that we can't use $libdir for this as that will often be /usr/lib64
and the udevdir is arch-independent.
Also add the autoconf bits needed to install 82-gfs2-withdraw.rules into
$udevdir/rules.d
Signed-off-by: Andrew Price <anprice@redhat.com>
---
README.build | 5 ++---
configure.ac | 8 ++++++++
gfs2/scripts/Makefile.am | 4 ++--
3 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/README.build b/README.build
index acfde1b..d0a21c3 100644
--- a/README.build
+++ b/README.build
@@ -31,10 +31,9 @@ To install gfs2-utils, run:
The following scripts (located in gfs2/scripts) are used to complete
the userland portion of the gfs2 withdraw feature using uevents. They
-are not installed by 'make install' and need to be installed manually
-or during rpm installation to the corresponding locations.
+will be installed by 'make install' to these directories by default:
- 82-gfs2-withdraw.rules in /etc/udev/rules.d/
+ 82-gfs2-withdraw.rules in /usr/lib/udev/rules.d/
gfs2_withdraw_helper in /usr/sbin/
See also doc/README.contributing for details on submitting patches and
diff --git a/configure.ac b/configure.ac
index de96e5a..35cafe6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -110,6 +110,12 @@ if test -z "$ncurses_CFLAGS" && test -z "$ncurses_LIBS"; then
ncurses_LIBS=-lncurses
fi
+AC_ARG_WITH([udevdir],
+ AS_HELP_STRING([--with-udevdir=DIR],
+ [udev directory containing rules.d [default=${prefix}/lib/udev]]),
+ [], [with_udevdir=\${prefix}/lib/udev])
+AC_SUBST([udevdir], [$with_udevdir])
+
# Checks for header files.
AC_CHECK_HEADERS([fcntl.h libintl.h limits.h locale.h mntent.h stddef.h sys/file.h sys/ioctl.h sys/mount.h sys/time.h sys/vfs.h syslog.h termios.h])
AC_CHECK_HEADER([linux/fs.h], [], [AC_MSG_ERROR([Unable to find linux/fs.h])])
@@ -209,7 +215,9 @@ echo " Configure summary"
echo " ==================="
echo " prefix : $prefix"
echo " exec_prefix : $exec_prefix"
+echo " libdir : $libdir"
echo " sbindir : $sbindir"
+echo " udevdir : $udevdir"
echo " ------------------"
echo " debug build : $enable_debug"
echo " C unit tests : $have_check"
diff --git a/gfs2/scripts/Makefile.am b/gfs2/scripts/Makefile.am
index 056aaa5..d4bda04 100644
--- a/gfs2/scripts/Makefile.am
+++ b/gfs2/scripts/Makefile.am
@@ -5,6 +5,6 @@ dist_sbin_SCRIPTS = \
gfs2_trace \
gfs2_withdraw_helper
-noinst_SCRIPTS = \
+udevrulesdir=@udevdir@/rules.d
+dist_udevrules_DATA = \
82-gfs2-withdraw.rules
-
--
2.4.3
next prev parent reply other threads:[~2015-08-19 11:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-19 11:55 [Cluster-devel] [PATCH 0/3] gfs2-utils: Withdraw helper script integration Andrew Price
2015-08-19 11:55 ` [Cluster-devel] [PATCH 1/3] scripts: rename gfs2_wd_udev.sh to gfs2_withdraw_helper Andrew Price
2015-08-19 11:55 ` [Cluster-devel] [PATCH 2/3] scripts: install the withdraw helper script Andrew Price
2015-08-19 11:55 ` Andrew Price [this message]
2015-08-19 16:15 ` [Cluster-devel] [PATCH 0/3] gfs2-utils: Withdraw helper script integration Abhijith Das
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=1439985309-6969-4-git-send-email-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).