gfs2-utils: RHEL7 - scripts: install the withdraw udev rules script

Andrew Price andyp at fedoraproject.org
Thu Aug 20 15:42:07 UTC 2015


Gitweb:        http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=f26de3589548a9fde9797e9f515b5b27de5a961d
Commit:        f26de3589548a9fde9797e9f515b5b27de5a961d
Parent:        c17455947281083e73567871ba1777d7ec135d4e
Author:        Andrew Price <anprice at redhat.com>
AuthorDate:    Wed Aug 19 12:13:39 2015 +0100
Committer:     Andrew Price <anprice at redhat.com>
CommitterDate: Thu Aug 20 15:58:10 2015 +0100

scripts: install the withdraw udev rules script

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

Resolves: rhbz#1225634
Signed-off-by: Andrew Price <anprice at 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
-


More information about the cluster-commits mailing list