File 0001-btrfsmaintenance-refresh-cron.sh-reset-OnCalendar-fo.patch of Package btrfsmaintenance.37468

From 3d595098a4dca42d6c4c5c6835cefd89e28147eb Mon Sep 17 00:00:00 2001
From: David Wilkinson <davidmwilkinson@protonmail.com>
Date: Thu, 10 Jun 2021 13:51:38 -0400
Subject: [PATCH] btrfsmaintenance-refresh-cron.sh: reset OnCalendar for
 generated drop-in files

Add an empty OnCalendar line to the generated drop-in conf file. This
fixes the linked issues where the default periods are used in addition
to any periods provided in the btrfsmaintenance config, which is not
what users expect.

See systemd.timer(5) why it needs to be reset.

Issue: #71
Issue: #91
Pull-request: #94
Author: David Wilkinson <davidmwilkinson@protonmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
---
 btrfsmaintenance-refresh-cron.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/btrfsmaintenance-refresh-cron.sh b/btrfsmaintenance-refresh-cron.sh
index e852b48..632eb19 100755
--- a/btrfsmaintenance-refresh-cron.sh
+++ b/btrfsmaintenance-refresh-cron.sh
@@ -74,6 +74,7 @@ refresh_timer() {
 			mkdir -p /etc/systemd/system/"$SERVICE".timer.d/
 			cat << EOF > /etc/systemd/system/"$SERVICE".timer.d/schedule.conf
 [Timer]
+OnCalendar=
 OnCalendar=$PERIOD
 EOF
 			systemctl enable "$SERVICE".timer &> /dev/null
-- 
2.35.3

openSUSE Build Service is sponsored by