[systemd-devel] ConditionNeedsUpdate date comparison
lennart at poettering.net
Tue Jan 27 09:35:28 PST 2015
On Tue, 27.01.15 11:17, Umut Tezduyar Lindskog (umut at tezduyar.com) wrote:
> > Well, this stuf is not intended to support downgrades. I don't think
> > that can ever work...
> > But anyway, I don't really understand what you are trying to say I
> > must admit. Could you please elaborate?
> Pretty much what I am saying is we wan't to use
> ConditionNeedsUpdate=/etc for downgrade case. Why do you think it
> won't work?
Well, it's hard to know in advance what the future will bring, hence
it's difficult to have the right triggers in place to run when
something from the future is downgraded...
> Instead of "IF time(/usr) > time(/etc/.updated)", we can check "IF
> time(/usr) != time(/etc/.updated)".
Ah, I see. Well, I figure we could change this. I do wonder though if
this might be a problem with file systems that do not store timestamps
as accurately (for example fat has a 2s granularity), where we might
not be able to apply the precise timestamps from /usr to /var, and
thus would end up running the conditioned unit every single boot?
But well, I figure most modern file systems have usec granularity,
hence I'd accept a patch to change this to != I figure...
Lennart Poettering, Red Hat
More information about the systemd-devel