From ab10bf8132197a0f4f2fb28e4c2ea0f619d6ffb4 Mon Sep 17 00:00:00 2001 From: wguanghao Date: Wed, 17 Jul 2024 15:27:59 +0800 Subject: [PATCH] mdmonitor.service: add conditional judgment to avoid service startup failed (cherry picked from commit 849ed9be1d793401883b8856c314818b65f7a53c) --- mdadm.spec | 5 ++++- mdmonitor.service | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/mdadm.spec b/mdadm.spec index a56d1f2..50cc04c 100644 --- a/mdadm.spec +++ b/mdadm.spec @@ -1,6 +1,6 @@ Name: mdadm Version: 4.2 -Release: 16 +Release: 17 Summary: The software RAID arrays user manage tools License: GPLv2+ URL: http://www.kernel.org/pub/linux/utils/raid/mdadm/ @@ -96,6 +96,9 @@ install -d -m 710 %{buildroot}/var/run/mdadm/ %{_mandir}/man*/* %changelog +* Wed Jul 17 2024 wuguanghao - 4.2-17 +- mdmonitor.service: add conditional judgment to avoid service startup failed + * Mon Jun 24 2024 wuguanghao - 4.2-16 - Manage: fix check after dereference issue diff --git a/mdmonitor.service b/mdmonitor.service index b45d86f..8ad3a11 100644 --- a/mdmonitor.service +++ b/mdmonitor.service @@ -10,6 +10,7 @@ Description=MD array monitor DefaultDependencies=no Wants=systemd-tmpfiles-setup.service After=systemd-tmpfiles-setup.service +ConditionPathExistsGlob=/dev/md* [Service] Type=forking -- Gitee