![](https://seccdn.libravatar.org/avatar/3d586c792067fd2470d90197c537c3be.jpg?s=120&d=mm&r=g)
On 1/14/24 09: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
Hi, two issues in your drop-in file: you need to specify the section headers, and you need to clear the existing entry (assuming you don't want two calendar entries). For example: ``` [Timer] OnCalendar= OnCalendar=Sat *-*-* 4:00:00 ``` Hope that helps. Georg
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. :(
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.