]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - util.c
Change some "fprintf(stderr,"s to pr_err.
[thirdparty/mdadm.git] / util.c
diff --git a/util.c b/util.c
index 7e2bbad14ed89a3035d0969eab6ad64d204b8612..3d2c3f09ad67bdc75165a50f8523161efb4fdb07 100644 (file)
--- a/util.c
+++ b/util.c
@@ -1745,6 +1745,11 @@ int start_mdmon(char *devnm)
                        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",
                         devnm);
                status = execl("/usr/bin/systemctl", "systemctl", "start",