From af720f38d9378ba347d2195278266f7bf579171b Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Sun, 10 Mar 2024 22:57:22 +0800 Subject: [PATCH] units: make quota services bind to corresponding mount units Follow-up for a628d933cc67cc8b183dc809ba1451aa5b2996e5 systemd-growfs@.service does the same. --- units/quotaon@.service.in | 4 ++-- units/systemd-quotacheck@.service.in | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/units/quotaon@.service.in b/units/quotaon@.service.in index 136060a9a17..23f365ae2c9 100644 --- a/units/quotaon@.service.in +++ b/units/quotaon@.service.in @@ -14,9 +14,9 @@ Documentation=man:quotaon(8) ConditionPathExists={{QUOTAON}} ConditionPathExists=!/etc/initrd-release -After=%i.mount -After=systemd-quotacheck@%i.service DefaultDependencies=no +BindsTo=%i.mount +After=systemd-quotacheck@%i.service %i.mount Before=shutdown.target Conflicts=shutdown.target diff --git a/units/systemd-quotacheck@.service.in b/units/systemd-quotacheck@.service.in index dddce2ee832..f2b8db7abb8 100644 --- a/units/systemd-quotacheck@.service.in +++ b/units/systemd-quotacheck@.service.in @@ -15,6 +15,7 @@ ConditionPathExists={{QUOTACHECK}} ConditionPathExists=!/etc/initrd-release DefaultDependencies=no +BindsTo=%i.mount After=%i.mount Before=shutdown.target Conflicts=shutdown.target