]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - misc/mdcheck
mdadm: Stop mdcheck_continue timer when mdcheck_start service can finish check
[thirdparty/mdadm.git] / misc / mdcheck
index 700c3e252e72e526807a12673ee54ddc289f3e3d..f87999d3e797bb000ef99ad530baf246e88aec7b 100644 (file)
@@ -140,7 +140,13 @@ do
                echo $a > $fl
                any=yes
        done
-       if [ -z "$any" ]; then exit 0; fi
+       # mdcheck_continue.timer is started by mdcheck_start.timer.
+       # When the check action can be finished in mdcheck_start.service,
+       # it doesn't need mdcheck_continue anymore.
+       if [ -z "$any" ]; then
+               systemctl stop mdcheck_continue.timer
+               exit 0;
+       fi
        sleep 120
 done