linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] [PATCH] Use LVM_PATH instead of hard-coded /usr/sbin/lvm
@ 2013-08-14 18:38 Michael Stapelberg
  2013-08-15  8:04 ` Peter Rajnoha
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Stapelberg @ 2013-08-14 18:38 UTC (permalink / raw)
  To: linux-lvm

[-- Attachment #1: Type: text/plain, Size: 226 bytes --]

Hi,

I noticed that the systemd generator hardcodes /usr/sbin/lvm.

Attached you can find a patch which fixes the issue. Please merge it or
fix the issue in a different way if you prefer :). Thanks!

-- 
Best regards,
Michael

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: lvm_path.patch --]
[-- Type: text/x-diff, Size: 1028 bytes --]

Description: Use LVM_PATH instead of hard-coded /usr/sbin/lvm
Author: Michael Stapelberg <stapelberg@debian.org>
Last-Update: 2013-08-14

---

Index: lvm2-2.02.98/scripts/lvm2_activation_generator_systemd_red_hat.c
===================================================================
--- lvm2-2.02.98.orig/scripts/lvm2_activation_generator_systemd_red_hat.c	2013-08-14 18:44:12.005448150 +0200
+++ lvm2-2.02.98/scripts/lvm2_activation_generator_systemd_red_hat.c	2013-08-14 18:52:14.403183063 +0200
@@ -20,6 +20,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include "lvm2app.h"
+#include "lib.h" /* for LVM_PATH */
 
 #define KMSG_DEV_PATH        "/dev/kmsg"
 #define LVM_CONF_USE_LVMETAD "global/use_lvmetad"
@@ -125,7 +126,7 @@
 	fputs("Before=local-fs.target shutdown.target\n"
 	      "Wants=systemd-udev-settle.service\n\n"
 	      "[Service]\n"
-	      "ExecStart=/usr/sbin/lvm vgchange -aay --sysinit\n"
+	      "ExecStart=" LVM_PATH " vgchange -aay --sysinit\n"
 	      "Type=oneshot\n", f);
 
 	if (fclose(f) < 0) {

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-08-15  8:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-14 18:38 [linux-lvm] [PATCH] Use LVM_PATH instead of hard-coded /usr/sbin/lvm Michael Stapelberg
2013-08-15  8:04 ` Peter Rajnoha

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).