Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 254647 - hwlock no longer read/writes, should fall back to manual input
Summary: hwlock no longer read/writes, should fall back to manual input
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-12 14:53 UTC by Jacob Godserv
Modified: 2009-01-15 15:26 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Manual time input (clock.patch,471 bytes, patch)
2009-01-12 15:06 UTC, Jacob Godserv
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jacob Godserv 2009-01-12 14:53:26 UTC
It appears my hardware clock just failed, so Gentoo Linux is no longer able to read it. (100% CPU, read/write from/to hwclock times out.) When it failed, it just kinda gave up, telling me to set it, but not giving me a chance before every other service started up and freaked out.

Reproducible: Always

Steps to Reproduce:
1. Kill your hardware clock.
2. Turn your computer on.
Actual Results:  
Your time is no longer accurate.

Expected Results:  
It should ask you what time it is, and set your system clock according to that.

I'm attaching a patch which I've tested on my system, and appears to work fine. I'm at a point in my bash scripting skills where I know enough to be effective, but little enough to be dangerous. Please review it before applying. ;)
Comment 1 Jacob Godserv 2009-01-12 15:06:13 UTC
Created attachment 178175 [details, diff]
Manual time input
Comment 2 Serkan Kaba (RETIRED) gentoo-dev 2009-01-12 16:08:37 UTC
I don't think a user should be prompted for date input in the middle of a boot. Yur patch reveals that it's already printing error for the user. Also please post emerge --info output.
Comment 3 SpanKY gentoo-dev 2009-01-12 17:18:49 UTC
yeah, as Serkan says, we arent going to make things interactive

if you want to recover the clock, use ntp or similar service.  does your system not boot if the hwclock is set to something wrong ?  we can (should) fix that, but that's about it ...
Comment 4 Jacob Godserv 2009-01-15 14:19:17 UTC
Well, it's not that it doesn't boot (at least, I never got into the default bootlevel - I had hit Ctrl+Alt+Del by that point), it's that I simply don't know what was time-sensitive and could've been messed up by a bad clock.

You could ask the user whether or not they want to enter the time manually, and have that prompt time out after a little bit. That would give you a non-interactive shell while letting "normal" desktop users set their clock before something bad happens.
Comment 5 SpanKY gentoo-dev 2009-01-15 15:26:49 UTC
messed up clocks wont cause irreparable damage.  just log in, fix the clock, and reboot.

at this time we arent adding sanity checks and autofixing things for the user.  that isnt a goal and i'm not sure if it's something we want (due to the additional overhead for negligible gain).