File systemd-lvm2-activation-generator-report-only-error.patch of Package lvm2.631
From 99fe3b88d270fa310d05dd093bea6dd74dc75642 Mon Sep 17 00:00:00 2001
From: Peter Rajnoha <prajnoha@redhat.com>
Date: Thu, 22 Aug 2013 08:14:11 +0200
Subject: systemd: lvm2-activation-generator: report only error otherwise be
silent
Git-repo: https://git.fedorahosted.org/git/lvm2.git
Git-commit: 99fe3b88d270fa310d05dd093bea6dd74dc75642 (partial)
Patch-filtered: skipped WHATS_NEW
References: bnc#878481
Do not print success status for lvm2-activation-generator:
"LVM: Activation generator successfully completed."
"LVM: Logical Volume autoactivation enabled." (if use_lvmetad=1)
Though this information is quite useful during boot, it may
be confusing for users if it happens anytime later and it
actually happens if systemd reloads. This is usually on package
update to update the systemd state and load any new units that are
newly installed in the system. The systemd reload is global and
so any existing generators are rerun at that moment too.
---
scripts/lvm2_activation_generator_systemd_red_hat.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/scripts/lvm2_activation_generator_systemd_red_hat.c b/scripts/lvm2_activation_generator_systemd_red_hat.c
index 9d4b581..9cec0a9 100644
--- a/scripts/lvm2_activation_generator_systemd_red_hat.c
+++ b/scripts/lvm2_activation_generator_systemd_red_hat.c
@@ -154,17 +154,16 @@ int main(int argc, char *argv[])
}
/* If lvmetad used, rely on autoactivation instead of direct activation. */
- if (lvm_uses_lvmetad()) {
- kmsg("LVM: Logical Volume autoactivation enabled.\n");
+ if (lvm_uses_lvmetad())
goto out;
- }
dir = argc > 1 ? argv[1] : DEFAULT_UNIT_DIR;
if (!generate_unit(dir, 1) || !generate_unit(dir, 0))
r = EXIT_FAILURE;
out:
- kmsg("LVM: Activation generator %s.\n", r ? "failed" : "successfully completed");
+ if (r)
+ kmsg("LVM: Activation generator failed.\n");
if (kmsg_fd != -1)
(void) close(kmsg_fd);
return r;