From 9fec9d9c0f7a168003ccbf571f77f9fbaed0c4cd 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 f26f4bab698de246e12b9f23cb255cc51a8f355d) --- mdadm.spec | 5 ++++- mdmonitor.service | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/mdadm.spec b/mdadm.spec index 6ff7096..ada513b 100644 --- a/mdadm.spec +++ b/mdadm.spec @@ -1,6 +1,6 @@ Name: mdadm Version: 4.2 -Release: 15 +Release: 16 Summary: The software RAID arrays user manage tools License: GPLv2+ URL: http://www.kernel.org/pub/linux/utils/raid/mdadm/ @@ -101,6 +101,9 @@ install -d -m 710 %{buildroot}/var/run/mdadm/ %{_mandir}/man*/* %changelog +* Fri Oct 17 2025 wuguanghao - 4.2-16 +- mdmonitor.service: add conditional judgment to avoid service startup failed + * Tue Mar 18 2025 wuguanghao - 4.2-15 - Super1 clear extra flags when initializing metadata 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