* [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
* Re: [linux-lvm] [PATCH] Use LVM_PATH instead of hard-coded /usr/sbin/lvm
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
0 siblings, 0 replies; 2+ messages in thread
From: Peter Rajnoha @ 2013-08-15 8:04 UTC (permalink / raw)
To: LVM general discussion and development; +Cc: Michael Stapelberg
On 08/14/2013 08:38 PM, Michael Stapelberg wrote:
> 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!
I've just changed the #include "lib.h" to #include "configure.h" which
is sufficient here. Upstream now:
https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=8cbbe851a80e8d99dc886ce9b44834137731d8ce
Thanks for the patch.
Peter
^ 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).