On 14.01.2024 11:02, Felix Miata wrote:
7 days ago I ran 'systemctl cat mdcheck_start.timer' and decided I didn't like either the time or the day of the default, Sunday @01:00, so I did 'systemctl edit mdcheck_start.timer'. The following is the result of saving the edit: # systemctl cat mdcheck_start.timer # /usr/lib/systemd/system/mdcheck_start.timer # This file is part of mdadm. # # mdadm is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version.
[Unit] Description=MD array scrubbing
[Timer] OnCalendar=Sun *-*-* 1:00:00
[Install] WantedBy= mdmonitor.service Also= mdcheck_continue.timer
# /etc/systemd/system/mdcheck_start.timer.d/override.conf OnCalendar=Sat *-*-* 4:00:00 # The override file created by the edit contains only:
OnCalendar=Sat *-*-* 4:00:00
I didn't change any file directly. I added that 04:00 Saturday line in between the marks indicated by opening the systemd object for edit, about 4 lines from top in the blank space.
I rebooted twice since. It's 2:20 Saturday as I type this, and mdcheck is running, started by the timer at 01:00. 'systemctl status mdcheck_start.timer' reports: ... systemd[1]: /etc/systemd/system/mdcheck_start.timer.d/override.conf:1: Assignment outside of section. Ignoring ... What more is required to implement my timer change here? As yet, I haven't found an example of making a change to a unit file, rather than an addition or deletion. :(
I wonder, whether you ever try to read documentation before asking. What is not clear in May be specified more than once, in which case the timer unit will trigger whenever any of the specified expressions elapse. Moreover calendar timers and monotonic timers (see above) may be combined within the same timer unit. If the empty string is assigned to any of these options, the list of timers is reset (both OnCalendar= timers and monotonic timers, see above), and all prior assignments will have no effect.
The editor systemctl uses for editing is not my preference. I think it's nano. I want mcedit. Where do I change the global default editor to my preference? Nothing looks obvious in /etc/sysconfig/, in yast or in /etc/alternatives/. If there's no simple way, and the /etc/alternatives method can be implemented, I'd like to try it. I attempted so based on https://unix.stackexchange.com/questions/408413/change-default-editor-to-vim... but failed due to 'which editor' returning not found.