[PATCH v2 06/49] kpartx.rules: use @BINDIR@ to locate kpartx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The path for kpartx should match the installed binary.

Signed-off-by: Martin Wilck <mwilck@xxxxxxxx>
---
 .gitignore                               | 1 +
 kpartx/Makefile                          | 6 +++---
 kpartx/{kpartx.rules => kpartx.rules.in} | 2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)
 rename kpartx/{kpartx.rules => kpartx.rules.in} (96%)

diff --git a/.gitignore b/.gitignore
index 049ffe8..355ddbb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,6 +12,7 @@ config.mk
 cscope.files
 cscope.out
 kpartx/kpartx
+kpartx/kpartx.rules
 multipath/multipath
 multipath/multipath.8
 multipath/multipath.conf.5
diff --git a/kpartx/Makefile b/kpartx/Makefile
index 7720a74..849fd36 100644
--- a/kpartx/Makefile
+++ b/kpartx/Makefile
@@ -13,13 +13,13 @@ LIBDEPS += -ldevmapper
 OBJS := bsd.o dos.o kpartx.o solaris.o unixware.o dasd.o sun.o \
 	gpt.o mac.o ps3.o crc32.o lopart.o xstrncpy.o devmapper.o
 
-all: $(EXEC)
+all: $(EXEC) kpartx.rules
 
 $(EXEC): $(OBJS)
 	@echo building $@ because of $?
 	$(Q)$(CC) $(CFLAGS) $(OBJS) -o $(EXEC) $(LDFLAGS) $(LIBDEPS)
 
-install: $(EXEC) $(EXEC).8
+install: $(EXEC) $(EXEC).8 kpartx.rules
 	$(Q)$(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
 	$(Q)$(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)
 	$(Q)$(INSTALL_PROGRAM) -d $(DESTDIR)$(libudevdir)
@@ -41,7 +41,7 @@ uninstall:
 	$(Q)$(RM) $(DESTDIR)$(libudevdir)/rules.d/68-del-part-nodes.rules
 
 clean: dep_clean
-	$(Q)$(RM) core *.o $(EXEC)
+	$(Q)$(RM) core *.o $(EXEC) kpartx.rules
 
 include $(wildcard $(OBJS:.o=.d))
 
diff --git a/kpartx/kpartx.rules b/kpartx/kpartx.rules.in
similarity index 96%
rename from kpartx/kpartx.rules
rename to kpartx/kpartx.rules.in
index 8dd3369..9d87960 100644
--- a/kpartx/kpartx.rules
+++ b/kpartx/kpartx.rules.in
@@ -39,6 +39,6 @@ LABEL="mpath_kpartx_end"
 GOTO="kpartx_end"
 
 LABEL="run_kpartx"
-RUN+="/sbin/kpartx -un -p -part /dev/$name"
+RUN+="@BINDIR@/kpartx -un -p -part /dev/$name"
 
 LABEL="kpartx_end"
-- 
2.45.2





[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux