SHA256
1
0
forked from pool/mdadm
mdadm/0004-Suppress-error-messages-from-systemctl.patch
Neil Brown e25ca3c260 - assemble-EXCL-race.fix: avoid some races during
array assembled- particularly at boot (bnc#793954)
- boot.md: make sure systemd-udev-trigger runs before
  boot.md to avoid races: bnc#793954
- mdmon@.service - new file plus patches to allow
  mdmon to be started by systemd, so it doesn't
  kill it (bnc#321366)

OBS-URL: https://build.opensuse.org/package/show/Base:System/mdadm?expand=0&rev=85
2013-06-13 04:16:10 +00:00

31 lines
930 B
Diff

References: bnc#821366
Git-commit: 701d5b4ab5ad72f8998d4398d5b209fea877ce37
From: NeilBrown <neilb@suse.de>
Date: Wed, 15 May 2013 11:10:54 +1000
Subject: [PATCH] Suppress error messages from systemctl.
We call systemctl to see if systemd will run mdmon for us.
If it cannot, we run mdmon directly, so we aren't interested
in the error message.
So redirect stderr to /dev/null.
Signed-off-by: NeilBrown <neilb@suse.de>
---
util.c | 5 +++++
1 file changed, 5 insertions(+)
--- mdadm-3.2.6.orig/util.c
+++ mdadm-3.2.6/util.c
@@ -1652,6 +1652,11 @@ int start_mdmon(int devnum)
else
skipped = 0;
+ /* Don't want to see error messages from systemctl.
+ * If the service doesn't exist, we start mdmon ourselves.
+ */
+ close(2);
+ open("/dev/null", O_WRONLY);
snprintf(pathbuf, sizeof(pathbuf), "mdmon@%s.service",
devnum2devname(devnum));
status = execl("/usr/bin/systemctl", "systemctl", "start",