summaryrefslogtreecommitdiff
path: root/udev/Makefile.in
diff options
context:
space:
mode:
authorPeter Rajnoha <prajnoha@redhat.com>2012-02-20 19:38:40 +0000
committerPeter Rajnoha <prajnoha@redhat.com>2012-02-20 19:38:40 +0000
commit6dd70f472a2ad72fab1fba728cdac5b40c44895b (patch)
tree07eb86d82d980dce52ab7d5d4ff3b9b1a34412e7 /udev/Makefile.in
parent815aa3555f39fc39ee540aacb55c1a19061bd122 (diff)
downloadlvm2-6dd70f472a2ad72fab1fba728cdac5b40c44895b.tar.gz
Call built-in blkid conditionaly (udev version >= 176), call standard blkid
with full path otherwise.
Diffstat (limited to 'udev/Makefile.in')
-rw-r--r--udev/Makefile.in8
1 files changed, 7 insertions, 1 deletions
diff --git a/udev/Makefile.in b/udev/Makefile.in
index 11635bbc2..5c5c8410b 100644
--- a/udev/Makefile.in
+++ b/udev/Makefile.in
@@ -19,6 +19,12 @@ DM_RULES=10-dm.rules 13-dm-disk.rules 95-dm-notify.rules
LVM_RULES=11-dm-lvm.rules
DM_DIR=$(shell grep "\#define DM_DIR" $(top_srcdir)/libdm/misc/dm-ioctl.h | awk '{print $$3}')
+ifeq ("@UDEV_HAS_BUILTIN_BLKID@", "yes")
+ BLKID_RULE=IMPORT{builtin}=\"blkid\"
+else
+ BLKID_RULE=IMPORT{program}=\"\$$env{DM_SBIN_PATH}\/blkid -o udev -p \$$tempnode\"
+endif
+
CLEAN_TARGETS=10-dm.rules
include $(top_builddir)/make.tmpl
@@ -26,7 +32,7 @@ include $(top_builddir)/make.tmpl
vpath %.rules $(srcdir)
%.rules: %.rules.in
- $(SED) -e "s/(DM_DIR)/$(DM_DIR)/" $< >$@
+ $(SED) -e "s/(DM_DIR)/$(DM_DIR)/" -e "s/(BLKID_RULE)/$(BLKID_RULE)/" $< >$@
%_install: %.rules
$(INSTALL_DATA) -D $< $(udevdir)/$(<F)