answered
2020-04-23 18:38:53 +0200
The problem usually stem from the /home
partition not being up at the time systemd scans for service and timers. (Note how the user timer osupdate-check.server
is hosted on the root partition, in /usr/lib/systemd/user/
).
Nowadays it doesn't happen on a lot of Linux distributions because most systems tend to use a single partition for everything, but since the move to LVM, Sailfish X does have split partitions.
In one of the Raspberry Pi project I have (I use split partition because only F2FS is available at boot time, and I wanted to use BTRFS for /home), I simply have added code in /etc/rc.local
to force re-enabling the missing stuff.
You could also try rescanning the --user units (something along the lines of systemctl --user daemon-reload
, to be called from within a root service with User=nemo
option and which waits for /home to mount, e.g.: After=local-fs.target
.) There were caveat in calling reload from within a unit, but saddly I don't remember, and I am not administrating that machine anymore. (Give it a try and google any error message you find in journalctl
if it fails).
Note: On Redhat and CentOS specifically, it fails for an entirely different reason: --user units are disabled there, root units are the only solution. Luckily that's not the case on Sailfish OS.
show your timer contents
coderus ( 2020-04-21 13:32:19 +0200 )editThe setup works once I move my timer into /lib/systemd/system, but I fully expect those files to be overwritten with any SFOS update, hence the need to redo my current setup. Expected behaviour is systemd to be able to start user timers as with any other linux system as well, but it clearly is not.
Nevertheless, running my units from /lib/systemd proves my setup being generally correct,
Any help appreciated.
Kobold ( 2020-04-21 18:23:18 +0200 )editsure, just shouw contents of your timer file
coderus ( 2020-04-22 01:42:29 +0200 )editI'm sorry, I did not see your comment when posting my update, possibly a browser cache thing. My timer file looks like this (Edits to fix incorrect linewraps and star is an in-place substitute for the * as the board breaks the layout if you include one.):
[Unit]
Description=Disable DND mode
[Timer]
OnCalendar=star-star-star 07:00:00
OnBootSec=10s
[Install]
WantedBy = multi-user.target
Kobold ( 2020-04-22 12:30:39 +0200 )editTake a look at how MeeCast achieves that:
This has been working fine since SailfishOS 1.0.x.
P.S.: On first sight, you missed to define a Systemd Unit (e.g., a Service Unit) to be started by your Timer Unit.
olf ( 2020-04-23 21:52:49 +0200 )edit