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

Bug#48866: Time-Zone still wrong



Hi :)

In article <[🔎] 20000117211719.A642@zip.com.au>,
  at Mon, 17 Jan 2000 21:17:20 +1100,
    on Bug#48866: Time-Zone still wrong,
 Greg Schafer <gschafer@zip.com.au> writes:

> No, the bug is still there. At least it was last time I checked.
> 
> It shouldn't be that hard to fix. If the user says YES, (their clock is set to
> GMT), do nothing. If the user says NO, (their clock is not set to GMT), then change
> the line in '/target/etc/default/rcS' that governs this aspect.
> 
> UTC=yes
> 
> ie: change it from 'UTC=yes' to 'UTC=no'
> 
> Have a look at the description in /etc/default/rcS. It says:
> # Set UTC=yes if your system clock is set to UTC (GMT), and UTC=no if not.
> 
> Hmmm, looking at the code in tzconfig.c, it's trying to do the right thing but it
> doesn't work for dome reason :-(

I think the extra [\"] does impede that try.

The code in tzconfig.c:

/*
 * configure_timezone_step2
 * Dialog to determine whether the clock is set to GMT or no.
 */
static int configure_timezone_step2() {

(snip)

      execlog(SEDCOMMAND
              " -e 's:^UTC=\"yes\":UTC=\"no\":'"
              " /target/etc/default/rcS > /target/etc/default/rcS.new", LOG_INFO);

But ./etc/default/rcS in base2_2.tgz includes the following lines:

# Set UTC=yes if your system clock is set to UTC (GMT), and UTC=no if not.
UTC=yes

so [sed -e 's:^UTC=\"yes\":UTC=\"no\":'] will not be executed.

I think we Should change the line

              " -e 's:^UTC=\"yes\":UTC=\"no\":'"

into 

              " -e 's:^UTC=yes:UTC=no:'"

or add the latter line just after the current line.

You can check this by comparing the result of

  tar -Oxzf base2_2.tgz ./etc/default/rcS|sed -e 's:^UTC=yes:UTC=no:'

and 

  tar -Oxzf base2_2.tgz ./etc/default/rcS|sed -e 's:^UTC=\"yes\":UTC=\"no\":'

Regards.

-- 
  Taketoshi Sano: <sano@debian.org>,<sano@debian.or.jp>,<kgh12351@nifty.ne.jp>


Reply to: