summaryrefslogtreecommitdiff
path: root/udev
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2023-02-10 19:49:42 +0100
committerZdenek Kabelac <zkabelac@redhat.com>2023-02-10 20:54:05 +0100
commit391138ff303c85999782e1341a5e1d8a28810486 (patch)
tree72992cc8176470f672f951b61ca223bec4503207 /udev
parent2a72f8a49cf6601db7c987c7c4d6a72a29a59a1e (diff)
downloadlvm2-391138ff303c85999782e1341a5e1d8a28810486.tar.gz
configure.ac: support systemd-run binary path
Allow users to specify their path to systemd-run binary: configure --with-systemd-run=/my/path/system-run By defaults it autodetected in $PATH and fallbacks to: /usr/bin/systemd-run.
Diffstat (limited to 'udev')
-rw-r--r--udev/69-dm-lvm.rules.in2
-rw-r--r--udev/Makefile.in6
2 files changed, 4 insertions, 4 deletions
diff --git a/udev/69-dm-lvm.rules.in b/udev/69-dm-lvm.rules.in
index 3cda30023..ff1568145 100644
--- a/udev/69-dm-lvm.rules.in
+++ b/udev/69-dm-lvm.rules.in
@@ -76,7 +76,7 @@ LABEL="lvm_scan"
# it's better suited to appearing in the journal.
IMPORT{program}="(LVM_EXEC)/lvm pvscan --cache --listvg --checkcomplete --vgonline --autoactivation event --udevoutput --journal=output $env{DEVNAME}"
-ENV{LVM_VG_NAME_COMPLETE}=="?*", RUN+="/usr/bin/systemd-run --no-block --property DefaultDependencies=no --unit lvm-activate-$env{LVM_VG_NAME_COMPLETE} (LVM_EXEC)/lvm vgchange -aay --autoactivation event $env{LVM_VG_NAME_COMPLETE}"
+ENV{LVM_VG_NAME_COMPLETE}=="?*", RUN+="(SYSTEMDRUN) --no-block --property DefaultDependencies=no --unit lvm-activate-$env{LVM_VG_NAME_COMPLETE} (LVM_EXEC)/lvm vgchange -aay --autoactivation event $env{LVM_VG_NAME_COMPLETE}"
GOTO="lvm_end"
LABEL="lvm_end"
diff --git a/udev/Makefile.in b/udev/Makefile.in
index 106fca113..5ee30d09c 100644
--- a/udev/Makefile.in
+++ b/udev/Makefile.in
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2009-2010 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2009-2023 Red Hat, Inc. All rights reserved.
#
# This file is part of LVM2.
#
@@ -22,7 +22,7 @@ LVM_RULES=11-dm-lvm.rules 69-dm-lvm.rules
DM_DIR=$(shell $(GREP) "\#define DM_DIR" $(top_srcdir)/libdm/misc/dm-ioctl.h | $(AWK) '{print $$3}')
-BINDIR=@bindir@
+SYSTEMDRUN=@SYSTEMD_RUN_CMD@
ifeq ("@UDEV_RULE_EXEC_DETECTION@", "yes")
SBIN=\$$env{DM_SBIN_PATH}
DM_EXEC_RULE=ENV{DM_SBIN_PATH}=\"\/sbin\"\\nTEST!=\"\$$env{DM_SBIN_PATH}\/dmsetup\", ENV{DM_SBIN_PATH}=\"\/usr\/sbin\"
@@ -44,7 +44,7 @@ BLKID_RULE=IMPORT{program}=\"${SBIN}\/blkid -o udev -p \$$tempnode\"
endif
%.rules: $(srcdir)/%.rules.in
- $(Q) $(SED) -e "s+(DM_DIR)+$(DM_DIR)+;s+(BINDIR)+$(BINDIR)+;s+(BLKID_RULE)+$(BLKID_RULE)+;s+(DM_EXEC_RULE)+$(DM_EXEC_RULE)+;s+(DM_EXEC)+$(DM_EXEC)+;s+(LVM_EXEC_RULE)+$(LVM_EXEC_RULE)+;s+(LVM_EXEC)+$(LVM_EXEC)+;" $< >$@
+ $(Q) $(SED) -e "s+(DM_DIR)+$(DM_DIR)+;s+(SYSTEMDRUN)+$(SYSTEMDRUN)+;s+(BLKID_RULE)+$(BLKID_RULE)+;s+(DM_EXEC_RULE)+$(DM_EXEC_RULE)+;s+(DM_EXEC)+$(DM_EXEC)+;s+(LVM_EXEC_RULE)+$(LVM_EXEC_RULE)+;s+(LVM_EXEC)+$(LVM_EXEC)+;" $< >$@
%_install: %.rules
@echo " [INSTALL] $<"