1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Call built-in blkid conditionaly (udev version >= 176), call standard blkid

with full path otherwise.
This commit is contained in:
Peter Rajnoha 2012-02-20 19:38:40 +00:00
parent 815aa3555f
commit 6dd70f472a
2 changed files with 8 additions and 2 deletions

View File

@ -19,7 +19,7 @@ ENV{DM_UUID}=="?*", SYMLINK+="disk/by-id/dm-uuid-$env{DM_UUID}"
ENV{DM_SUSPENDED}=="1", GOTO="dm_end"
IMPORT{program}="blkid"
(BLKID_RULE)
ENV{DM_UDEV_LOW_PRIORITY_FLAG}=="1", OPTIONS="link_priority=-100"
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"

View File

@ -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)