Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
More tolerant parsing of /etc/adjtime #2638
Comments
poettering
added
RFE
pid1
labels
Feb 21, 2016
martinpitt
added
the
timedate
label
Feb 26, 2016
martinpitt
self-assigned this
Feb 26, 2016
|
The other half is in |
|
martinpitt/systemd@6369641 makes One thing that caught my eye is that an unknown value like "FOO" in the third line of |
added a commit
to martinpitt/systemd
that referenced
this issue
Feb 26, 2016
|
I don't think we should keep backwards compatibility here. The documentation is clear, timedatectl(1) refers to hwclock(8) which says that it must be "UTC" or "LOCAL". Bug-for-bug compatibility of undocumented things was never preserved. |
|
@keszybz: I figure If you agree, I'll change the tests and code accordingly. |
Sounds reasonable. Forget my previous comment.
This sounds problematic. If the value is wrong, we should just allow setting a new value no matter what. I'd be cumbersome for users to have to first fix it to something that timedatectl will accept, and then use timedatectl to change it. So... I think we should treat |
That's indeed what currently happens.
in timedated's journal? (That's simple to do). Or somewhere else, like timedatectl's stderr? Then we need to communicate this warning to timedatectl, or that has to parse adjtime itself (which requires moving that code to |
keszybz
closed this
in
c9410dd
Feb 28, 2016
|
I don't think it's worth the trouble to rearchitecture the code to produce a warning in timedatectl. I was thinking about timedated writing something to the journal, but meh, maybe things are fine as they are now. |
alkisg commentedFeb 16, 2016
My issue is this:
# timedatectl set-local-rtc 1Failed to set local RTC: Failed to set RTC to local/UTC: Input/output errorThis happens when /etc/adjtime is not exactly as systemd expects it.
While the reason for this is outside the systemd code, maybe systemd can be more tolerant and allow a few variations.
Actual examples that I've seen out there:
This problem is caused by
a) https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=699554
b) systemd.postinst on recent Debian/Ubuntu (I haven't yet filed a bug report for that one, will do so soon).
I don't know which script causes examples (2) and (3), but I see them in a lot of Ubuntu 12.04 installations.
So if possible, make the /etc/adjtime parsing a bit more tolerant.
Thanks!