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

Bug#65933: Setting clock to UTC sometimes doesn't work



severity 65933 fixed 
thanks
stop

In <[🔎] 394F01E7.227BFBC5@iname.com>,
 at "Tue, 20 Jun 2000 07:32:23 +0200",
  Niccolo Rigacci <rigacci@iname.com> writes:

> Package: boot-floppies
> Version: 2.2.15
> Subject: Setting
> 
> 
> When dbootstrap executes "Configure the Base System", if you
> choose to set the clock to local time, the string "UTC=no" is
> placed in /etc/default/rcS. This is OK.
> 
> But if you re-execute "Configure the Base System" and choose to
> set the clock to UTC, the value in /etc/default/rcS is not
> updated.
> 
> I suggest to place an "else" clause in configure_timezone_step2()
> function in boot-floppies/utilities/dbootstrap/tzconfig.c

Here is the diff which I just have commited.

Index: tzconfig.c
===================================================================
RCS file: /cvs/debian-boot/boot-floppies/utilities/dbootstrap/tzconfig.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -u -r1.16 -r1.17
--- tzconfig.c	2000/04/22 16:43:15	1.16
+++ tzconfig.c	2000/06/22 08:48:48	1.17
@@ -313,6 +313,17 @@
       execlog("mv /target/etc/default/rcS.new /target/etc/default/rcS", LOG_INFO);
       chmod("/target/etc/default/rcS", S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IROTH);
 #endif
+  } else {
+      /*
+       * revert if the /etc/default/rcS file is already modified
+       */
+#ifndef _TESTING_
+      execlog(SEDCOMMAND
+	      " -e 's:^UTC=\"no\":UTC=\"yes\":' -e 's:^UTC=no:UTC=yes:'"
+	      " /target/etc/default/rcS > /target/etc/default/rcS.new", LOG_INFO);
+      execlog("mv /target/etc/default/rcS.new /target/etc/default/rcS", LOG_INFO);
+      chmod("/target/etc/default/rcS", S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IROTH);
+#endif
   }
   
   return 0;



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



Reply to: