[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#247484: thoughts on date setting



(Dropping CC to d-boot as it'll end up on the list anyway :-)

On Monday 23 July 2007 01:47, Joey Hess wrote:
> Rather than have two or three clock-related things on the menu, I
> propose we have one clock-setup menu item, that runs after netcfg. This
> would include both calling tzsetup, as well as using rdate. tzsetup
> would stop being a menu item, and would be called from clock-setup's
> postinst (or merged into clock-setup, whatever works best).

I agree about merging clock-setup and tzsetup. The logic is getting 
intertwined now.

Please be careful about not breaking s/390 and nslu2 installs where 
localechooser is only loaded with anna and thus country selection (needed 
for timezone selection) is not available until after that. netcfg runs 
earlier.
I see that in the proposed menu items you actually do have clock-setup 
after anna, so that should be OK. And it's good as well in the sense that 
there should be no need to include rdate in initrds.

> That leaves the stuff that's in clock-setup now -- the clock-setup/utc
> question. This has to come after partitioning, and if it's not a menu
> item, where to run it?

The reason it has to run after partitioning being the need to run 
os-prober to get info about which other OSes are present.

> I propose moving the question to the 
> finish-install hook that actually modifies the config files for non-UTC
> systems. Most of the time users won't see the question at all, and
> putting it here, users with dual-boot systems will have just dealt with
> that in bootloader configuration, so it's natural that another question
> about multi-OS stuff comes here.

Let me see if I understand:
- early in install:
  - run rdate without changing the system clock
  - compare rdate output and current system clock to
    - check sanity of hardware clock
    - determine if hardware clock is on UTC or not
  - use country and previous to
    - check if clock is sane (if country has single timezone; for
      countries with more TZs it should still fit in the range)
    - determine default timezone (countres with more TZs)
  - set system time (using UTC)
- late in the install:
  - using os-prober info, determine if system should be on UTC or local
  - ask user if unsure
  - set hardware clock if needed (ask user if unsure)

The only question may be: how does having installed using UTC and possible 
switching to localtime affect the reboot.
This is different from what we do now as we now basically use the system 
clock for the install, and thus create files using local time if that is 
what the clock is set to.
I think this could create problems for users who are in a negative TZ (or 
maybe positive, not sure and too lazy to think it out ATM).

Maybe the "late in the install" bits should instead be done immediately 
after partitioning to solve this?

> Looking at the menu layout, that leaves user-setup as the only normally
> interactive thing between partman formatting the disks and apt-setup
> running at the end of base-installer. user-setup has no dependencies,
> so it can be moved out of that location. I suggest moving it to run
> just before apt-setup.

Seems OK. I wonder if we should then just commit the user settings in the 
postinst instead of during finish-install.

Attachment: pgpXyaSJySwB0.pgp
Description: PGP signature


Reply to: