Re: [gentoo-user] systemd boot timer

2021-10-01 Thread Rich Freeman
On Fri, Oct 1, 2021 at 4:36 PM antlists wrote: > > I now want to run lvm snapshot on the first boot of the weekend. Writing > a unit to do the snapshot seems pretty easy, but obviously I don't want > it firing every boot, if I stick the date in the volume name I don't > want it colliding with an e

Re: [gentoo-user] systemd boot timer

2021-10-01 Thread Canek Peláez Valdés
On Fri, Oct 1, 2021 at 5:24 PM antlists wrote: [...] > Ouch. Dunno if that would work. Bear in mind I'm running this BEFORE > fstab, so / is read-only ... > You can store the timestamp in /run and then have another unit that updates the timestamp in /var after remounting root (/) read/write. Aga

Re: [gentoo-user] systemd boot timer

2021-10-01 Thread antlists
On 01/10/2021 22:54, Canek Peláez Valdés wrote: On Fri, Oct 1, 2021 at 3:37 PM antlists > wrote: I think it would be much simpler to have a Type=oneshot service at boot, and the Exec= line to call a script. You can store the timestamp of the last time it wa

Re: [gentoo-user] systemd boot timer

2021-10-01 Thread Canek Peláez Valdés
On Fri, Oct 1, 2021 at 3:37 PM antlists wrote: > I'm trying to get a systemd unit to fire on boot once a week. Reading up > on timer units, I can't work out how to get it to work. > > This is tied up with my earlier systemd mount post - I've now got that > sorted - I've got dm-integrity to fire b