summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--roles/storage/zfs/syncoid/tasks/main.yml2
-rw-r--r--roles/storage/zfs/syncoid/templates/autosuspend.py.j29
2 files changed, 5 insertions, 6 deletions
diff --git a/roles/storage/zfs/syncoid/tasks/main.yml b/roles/storage/zfs/syncoid/tasks/main.yml
index c03a8325..738b7041 100644
--- a/roles/storage/zfs/syncoid/tasks/main.yml
+++ b/roles/storage/zfs/syncoid/tasks/main.yml
@@ -74,7 +74,7 @@
path: /etc/systemd/system/sanoid.timer.d
state: directory
- - name: make saoind timer not persistent
+ - name: disable persistence of sanoid timer
copy:
content: |
[Timer]
diff --git a/roles/storage/zfs/syncoid/templates/autosuspend.py.j2 b/roles/storage/zfs/syncoid/templates/autosuspend.py.j2
index 58752328..b783f7a2 100644
--- a/roles/storage/zfs/syncoid/templates/autosuspend.py.j2
+++ b/roles/storage/zfs/syncoid/templates/autosuspend.py.j2
@@ -72,13 +72,13 @@ class AutoSuspender(object):
for timer in timers:
next = self._get_timer_next_elapse(timer[1])
if next == None:
- print(" [NO] the next elapse of timer '%s' is invalid, assuming the unit is currently active" % (timer[0]))
+ print(" [NO] the next elapse time of '%s' is invalid, assuming the unit is currently active" % (timer[0]))
result = False
continue
until = next - datetime.datetime.now()
if(until < datetime.timedelta(minutes=10)):
- print(" [NO] timer '%s' elapses in less then 10 Minutes -> %s (%s)" % (timer[0], next, until))
+ print(" [NO] timer '%s' elapses in less than 10 minutes -> %s (%s)" % (timer[0], next, until))
result = False
else:
print(" [ok] timer '%s' elapses in %s (%s)" % (timer[0], until, next))
@@ -88,18 +88,17 @@ class AutoSuspender(object):
def suspend(self):
manager = self._get_logind_manager_interface()
if not manager.CanSuspend():
- print("suspending is not possible!")
+ print("ERR: system can not be suspended")
return
try:
manager.Suspend(False)
except dbus.exceptions.DBusException:
print("ERR: %s" % error)
- return None
if __name__ == "__main__":
s = AutoSuspender()
- print("checking if system should be suspended:")
+ print("checking if the system can be suspended:")
if s.check():
print("trying to suspend system")
s.suspend()