On Mon, 24 Feb 2020 14:36:56 +0000, Martin Gregorie wrote:
> On Mon, 24 Feb 2020 13:54:29 +0000, Adam Funk wrote:
>
>> On 2020-02-24, Richard Kettlewell wrote:
>>
>>> Adam Funk writes:
>>>> On 2020-02-20, Richard Kettlewell wrote:
>>>>> You stopped reading too early:
>>>> ...
>>>>> Start with ‘man systemd.timer’ for the syntax & meaning of the timer
>>>>> file, and look for ‘Overriding vendor settings’ in ‘man
>>>>> systemd.unit’
>>>>> for how to modify its behavior.
>>>>
>>>> Thanks --- I think I'm getting closer, but not successful yet. I
>>>> found a symlink from
>>>> /etc/systemd/system/timers.target.wants/anacron.timer to
>>>> /lib/systemd/system/anacron.timer, deleted it, copied the linked file
>>> ^^^^^^^^^^
>>>
>>> I have no idea why you would do that.
>>
>> Some stuff in the documentation led to believe that customized files
>> should go straight in etc --- should I restore the symlink and edit the
>> file in /lib/systemd/...?
>>
>>
>>>> into the etc location, and edited the relevant-looking line as
>>>> follows:
>>>>
>>>> #OnCalendar=*-*-* 07..23:30 OnCalendar=*-*-* 05..23:30
>>>>
>>>> Then I used touch to set the timestamp on
>>>> /var/spool/anacron/cron.daily back a few hours.
>>>>
>>>> And cron.daily got run at 07:30 again this morning. Any more
>>>> suggestions? I'd be grateful.
>>>
>>> You will probably need to run ‘systemctl daemon-reload’, but you’ll
>>> need to undo the random file deletion above first.
>>
>> Good point (I know I restarted cron and anacron, but forgot to mention
>> that above).
> There's a fairly decent description of systemd, how it works and is
> configured here:
>
> https://www.freedesktop.org/wiki/Software/systemd/
>
> IIRC it has instructions for changing configured values: it describes a
> way of storing changes to standard settings so that future system
> updates won't clobber your site-specific change.
Dang it, I was hoping for something wonderful for keeping customization.
What I found was
Q: I want to change a service file, but rpm keeps overwriting it
in /usr/lib/systemd/system all the time, how should I handle this?
A: The recommended way is to copy the service file from
/usr/lib/systemd/system to /etc/systemd/system and edit it there. The
latter directory takes precedence over the former, and rpm will
never overwrite it. If you want to use the distributed service
file again you can simply delete (or rename) the service file in
/etc/systemd/system again.
Which sounds like the road the OP went down initially. I always want to
use the service file that comes with the latest software so everything's
compatible & works as designed. I just want to tweak one setting in there,
PrivateTmp to be specific.
Right now I have a little script that runs right after updates and
checks the setting and edits the service file with sed as needed then
runs systemctl daemon-reload;systemctl restart THE_SERVICE
I guess I'm stuck with that... Unless someone knows of deeper magic
they're willing to share?
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|