[opensuse] Extrange change in "/etc/sysconfig/clock"
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 This paragraph: ## Path: System/Environment/Clock ## Description: Information about your timezone and time ## Type: string(-u,--utc,--localtime) ## ServiceRestart: boot.clock ## Command: /sbin/refresh_initrd # # Set to "-u" if your system clock is set to UTC, and to "--localtime" # if your clock runs that way. # HWCLOCK="-u" has been replaced with ## Path: System/Environment/Clock ## Description: Information about your timezone and time ## Type: string(Europe/Berlin,Europe/London,Europe/Paris) ## ServiceRestart: boot.clock ## Command: /sbin/refresh_initrd # # Be aware that the time reference of the CMOS/HW clock has been # forwarded to /etc/adjtime, the file used by hwclock(8) and # systemd(1) as reference for the CMOS/HW clock. Ie, the «HWCLOCK="-u"» line has dissapeared - in two different computers running 12.3, at least. The variable is important, it is sourced in "/etc/init.d/ntp" (script which still exists). Is this intentional, or is it a bug? - -- Cheers Carlos E. R. (from 12.3 x86_64 "Dartmouth" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlIfk8IACgkQtTMYHG2NR9UL6wCeKfu6Fq+UEzj7SyzlAnu1GORu FS8An3SaZS7FxjwCHQDNsY3hWKH5OoLn =l2Io -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thu, 29 Aug 2013 20:32:26 +0200 (CEST) "Carlos E. R." <robin.listas@telefonica.net> wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
This paragraph:
## Path: System/Environment/Clock ## Description: Information about your timezone and time ## Type: string(-u,--utc,--localtime) ## ServiceRestart: boot.clock ## Command: /sbin/refresh_initrd # # Set to "-u" if your system clock is set to UTC, and to "--localtime" # if your clock runs that way. # HWCLOCK="-u"
has been replaced with
## Path: System/Environment/Clock ## Description: Information about your timezone and time ## Type: string(Europe/Berlin,Europe/London,Europe/Paris) ## ServiceRestart: boot.clock ## Command: /sbin/refresh_initrd # # Be aware that the time reference of the CMOS/HW clock has been # forwarded to /etc/adjtime, the file used by hwclock(8) and # systemd(1) as reference for the CMOS/HW clock.
Ie, the «HWCLOCK="-u"» line has dissapeared - in two differen t computers running 12.3, at least.
The variable is important, it is sourced in "/etc/init.d/ntp" (script which still exists).
Is this intentional, or is it a bug?
- -- Cheers
Carlos E. R. (from 12.3 x86_64 "Dartmouth" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux)
iEYEARECAAYFAlIfk8IACgkQtTMYHG2NR9UL6wCeKfu6Fq+UEzj7SyzlAnu1GORu FS8An3SaZS7FxjwCHQDNsY3hWKH5OoLn =l2Io -----END PGP SIGNATURE-----
what line? I cannot find that paragraph -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iQGcBAEBAgAGBQJSH5e7AAoJEMJJyEmbX0np554L/0N/vEJxw768iyUs97lwhUAN pGyA9eOL/HJXGV8m33CpAmbNzOwWUkwFRNYMSHEBscRN0R7dKM1AoKkNdPBU/TpJ 6RHri3KppTD4h74MqLgftzw06gS/e7pv7TDHH2iDdcmV+WU7o4rorbgCUx82i8W1 UWh6Ro1H3HW35EG4fgx/6gDrN6+GileTdSRNhF6g3z3s3yzyYatq2L5HPE+V8ALX 0jGBDcYALXdjLj9MZwazKn6rKioNqocgsJ3O7F+Ig8Tv/awMNqSd4PcEKKaZI17x Pl9RAYOkaJk5pzJ+P9hXi+hAQB0NxV4h0i0hu7puH8N9eycz13IBVLbFT3t9T47/ FsOXBgcIs9osFbyiqPxPbhPZi41IuOwMO15rE/Z8dny+Gjv0z5Rke954DisDMm69 W1NxdMHyoOjR4wm6lIW3Mz4Jd+Gvvt1izsNQRYM0ghBoSQXe876uz1r4sBy+FU3x 9gj4hHMNAcC2K9DOPblezcrhq1JeciyAW578e7fULA== =DrXR -----END PGP SIGNATURE----- N�����r��y隊Z)z{.�ﮞ˛���m�)z{.��+�:�{Zr�az�'z��j)h���Ǿ� ޮ�^�ˬz��
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thursday, 2013-08-29 at 21:49 +0300, Ys wrote:
HWCLOCK="-u"
what line? I cannot find that paragraph
Just look for that line, please. It is missing, I don't know if intentionally or accidentally. - -- Cheers, Carlos E. R. (from 12.3 x86_64 "Dartmouth" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlIf23kACgkQtTMYHG2NR9WMYgCdFZp5SfZJUgm0tLIsH16+hXdB kdQAn2n+bo/3104ixWTxrtXkP50C3ZKN =7n2K -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Carlos E. R. wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
This paragraph:
## Path: System/Environment/Clock ## Description: Information about your timezone and time ## Type: string(-u,--utc,--localtime) ## ServiceRestart: boot.clock ## Command: /sbin/refresh_initrd # # Set to "-u" if your system clock is set to UTC, and to "--localtime" # if your clock runs that way. # HWCLOCK="-u"
has been replaced with
## Path: System/Environment/Clock ## Description: Information about your timezone and time ## Type: ## string(Europe/Berlin,Europe/London,Europe/Paris)
^^^^^^^^^^^^^^^^^^^^^^^ looks weird. The new YaST only appeared in 3.1, so it isn't that, otherwise I would think it is YaST. -- Per Jessen, Zürich (14.2°C) http://www.dns24.ch/ - free DNS hosting, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Thu, Aug 29, 2013 at 08:32:26PM +0200, Carlos E. R. wrote:
This paragraph:
## Path: System/Environment/Clock ## Description: Information about your timezone and time ## Type: string(-u,--utc,--localtime) ## ServiceRestart: boot.clock ## Command: /sbin/refresh_initrd # # Set to "-u" if your system clock is set to UTC, and to "--localtime" # if your clock runs that way. # HWCLOCK="-u"
has been replaced with
## Path: System/Environment/Clock ## Description: Information about your timezone and time ## Type: string(Europe/Berlin,Europe/London,Europe/Paris) ## ServiceRestart: boot.clock ## Command: /sbin/refresh_initrd # # Be aware that the time reference of the CMOS/HW clock has been # forwarded to /etc/adjtime, the file used by hwclock(8) and # systemd(1) as reference for the CMOS/HW clock.
Ie, the «HWCLOCK="-u"» line has dissapeared - in two different computers running 12.3, at least.
The variable is important, it is sourced in "/etc/init.d/ntp" (script which still exists).
The the "/etc/init.d/ntp" script is buggy. It has to use /etc/adjtime. Werner -- "Having a smoking section in a restaurant is like having a peeing section in a swimming pool." -- Edward Burr
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Friday, 2013-08-30 at 11:30 +0200, Dr. Werner Fink wrote:
On Thu, Aug 29, 2013 at 08:32:26PM +0200, Carlos E. R. wrote:
Ie, the «HWCLOCK="-u"» line has dissapeared - in two different computers running 12.3, at least.
The variable is important, it is sourced in "/etc/init.d/ntp" (script which still exists).
The the "/etc/init.d/ntp" script is buggy. It has to use /etc/adjtime.
Ok, so you mean that "HWCLOCK" has dissapeared, and instead ntp has to use "/etc/adjtime" (but it does not). However, how does "/etc/init.d/ntp" know if the system keeps the cmos on UTC or local time _before_ "/etc/adjtime" is created? I mean, is the user choice at install time stored somewhere, besides "/etc/adjtime"? Remember that this file has to be deleted completely as a cure to some clock problems, and recreated. - -- Cheers, Carlos E. R. (from 12.3 x86_64 "Dartmouth" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlIgfD4ACgkQtTMYHG2NR9UtGQCfeX9vQr7y/ApO6b+w5D6W485N iCcAoJk3jeJxj/hjmGS+HIwGsV0O2z/C =Qrrs -----END PGP SIGNATURE-----
On Fri, Aug 30, 2013 at 01:04:29PM +0200, Carlos E. R. wrote:
On Friday, 2013-08-30 at 11:30 +0200, Dr. Werner Fink wrote:
On Thu, Aug 29, 2013 at 08:32:26PM +0200, Carlos E. R. wrote:
Ie, the «HWCLOCK="-u"» line has dissapeared - in two different computers running 12.3, at least.
The variable is important, it is sourced in "/etc/init.d/ntp" (script which still exists).
The the "/etc/init.d/ntp" script is buggy. It has to use /etc/adjtime.
Ok, so you mean that "HWCLOCK" has dissapeared, and instead ntp has to use "/etc/adjtime" (but it does not). However, how does "/etc/init.d/ntp" know if the system keeps the cmos on UTC or local time _before_ "/etc/adjtime" is created?
I mean, is the user choice at install time stored somewhere, besides "/etc/adjtime"? Remember that this file has to be deleted completely as a cure to some clock problems, and recreated.
"/etc/adjtime" is created by a postinstall scriptlet of aaa_base: [...] # just do a one-time migration of the time setting from /etc/sysconfig/clock # to /etc/adjtime as systemd now use the later as reference # if test ! -e /etc/adjtime then echo -e "0.0 0 0.0\n0\nUTC" > /etc/adjtime fi if test -s /etc/sysconfig/clock then . /etc/sysconfig/clock if test -n "$HWCLOCK" then sed -ri '\@^##[[:blank:]]+Type:[[:blank:]]+string\(-u,--utc,--localtime\)@,\@^HWCLOCK=@c\ #\ # Be aware that the time reference of the CMOS/HW clock has been\ # forwarded to /etc/adjtime, the file used by hwclock(8) and\ # systemd(1) as reference for the CMOS/HW clock.\ ' /etc/sysconfig/clock case "$HWCLOCK" in *-l*) sed -ri 's@^UTC$@LOCAL@' /etc/adjtime ;; *) sed -ri 's@^LOCAL$@UTC@' /etc/adjtime ;; esac fi fi [...] this file should with 12.3 and following not be deleted. It is the only reference for the setup of the CMOS clock. Please note that this was not my idea even if the shell code is mine ;) Werner -- "Having a smoking section in a restaurant is like having a peeing section in a swimming pool." -- Edward Burr
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2013-08-30 14:05, Dr. Werner Fink wrote:
On Fri, Aug 30, 2013 at 01:04:29PM +0200, Carlos E. R. wrote:
...
this file should with 12.3 and following not be deleted. It is the only reference for the setup of the CMOS clock. Please note that this was not my idea even if the shell code is mine ;)
Thanks! That was a detailed description. Oh, well, I'll have to adjust the instructions I give people when their clocks go "mad". The problem is that the adjtime HAS to be deleted in that case (clock going hours off on every reboot), there is no way round that. I'll have to add instructions to create it again, different if cmos is utc or local... - -- Cheers / Saludos, Carlos E. R. (from 12.3 x86_64 "Dartmouth" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlIglEAACgkQtTMYHG2NR9USGgCdHP6zCfvHS3KEGZsfCqr9NiwI IvwAn3w2xh7NFEVGk2ebh80ehGTUJ7iW =fdIf -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 08/30/13 14:05, Dr. Werner Fink wrote:
this file should with 12.3 and following not be deleted. It is the only reference for the setup of the CMOS clock. Please note that this was not my idea even if the shell code is mine ;)
So, just for the record, whose idea was this design decision? Recording setup of the CMOS clock just in /etc/adjtime and nowhere else is not robust at all and will lead to many support problems. It works in the ideal world, on a developer's laptop -- but not in the real world where openSUSE is used. At my company, such code quality is called "it runs in my home directory and to hell with the rest" -- we get lots of such changes in openSUSE lately. :-( Cheers, Joachim PS: Werner, this is not explicitly not a personal criticism. As you wrote, you're not guilty... ;-) -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Joachim Schrod, Roedermark, Germany Email: jschrod@acm.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Sat, Aug 31, 2013 at 02:15:26AM +0200, Joachim Schrod wrote:
On 08/30/13 14:05, Dr. Werner Fink wrote:
this file should with 12.3 and following not be deleted. It is the only reference for the setup of the CMOS clock. Please note that this was not my idea even if the shell code is mine ;)
So, just for the record, whose idea was this design decision?
Recording setup of the CMOS clock just in /etc/adjtime and nowhere else is not robust at all and will lead to many support problems.
It works in the ideal world, on a developer's laptop -- but not in the real world where openSUSE is used. At my company, such code quality is called "it runs in my home directory and to hell with the rest" -- we get lots of such changes in openSUSE lately. :-(
This change was not lately and this change is caused simply by the upstream behaviour of systemd. This change was done at * Fri May 25 2012 werner@suse.de - Drop HWCOCK option flag in favour of the adjtime file and there was also some bugs #779440 and #791485 * Wed Oct 31 2012 werner@suse.de - Enforce creation of /etc/adjtime even if no /etc/sysconfig/clock exists (bnc#779440) * Wed Feb 06 2013 werner@suse.de - Do not override /etc/adjtime if HWCLOCK is already gone (bnc#791485) all changelog entries are from aaa_base. And I had informed the former maintainer of ntp. Please open a bug for ntp ... beside this /etc/init.d/ntp should become a systemd unit file IMHO Werner -- "Having a smoking section in a restaurant is like having a peeing section in a swimming pool." -- Edward Burr
On 08/31/13 11:15, Dr. Werner Fink wrote:
On Sat, Aug 31, 2013 at 02:15:26AM +0200, Joachim Schrod wrote:
On 08/30/13 14:05, Dr. Werner Fink wrote:
this file should with 12.3 and following not be deleted. It is the only reference for the setup of the CMOS clock. Please note that this was not my idea even if the shell code is mine ;)
So, just for the record, whose idea was this design decision?
Recording setup of the CMOS clock just in /etc/adjtime and nowhere else is not robust at all and will lead to many support problems.
It works in the ideal world, on a developer's laptop -- but not in the real world where openSUSE is used. At my company, such code quality is called "it runs in my home directory and to hell with the rest" -- we get lots of such changes in openSUSE lately. :-(
This change was not lately and this change is caused simply by the upstream behaviour of systemd.
Ah, of course. The "we don't need to care for established procedures, no matter what" people. In fact, I like systemd, I like its concept and the implementation is quite good for such a young system as well. But I dislike the attitude how changes are introduced by its proponents. They should take a look and learn from Linus: Disrupt your developers all the time, OK; but never disrupt your user. I hope somebody will teach them that lesson before they send the Linux ecosphere even more downward that spiral. There was a time when one could use many distributions mechanisms. That's gone, back to work like in the 90s. Nowadays, as then, one must rely on puppet or chef to establish proper configurations for many more system attributes, just as we had to do in the 90s with cfengine. Sad to see that we're going back to a time in Unix administration that I thought has gone to the dustbin. Welcome to your future, it's our past. Joachim -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Joachim Schrod, Roedermark, Germany Email: jschrod@acm.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Thursday 29 Aug 2013 20:32:26 Carlos E. R. wrote:
This paragraph:
## Path: System/Environment/Clock ## Description: Information about your timezone and time ## Type: string(-u,--utc,--localtime) ## ServiceRestart: boot.clock ## Command: /sbin/refresh_initrd # # Set to "-u" if your system clock is set to UTC, and to "--localtime" # if your clock runs that way. # HWCLOCK="-u"
has been replaced with
## Path: System/Environment/Clock ## Description: Information about your timezone and time ## Type: string(Europe/Berlin,Europe/London,Europe/Paris) ## ServiceRestart: boot.clock ## Command: /sbin/refresh_initrd # # Be aware that the time reference of the CMOS/HW clock has been # forwarded to /etc/adjtime, the file used by hwclock(8) and # systemd(1) as reference for the CMOS/HW clock.
Ie, the «HWCLOCK="-u"» line has dissapeared - in two different computers running 12.3, at least.
The variable is important, it is sourced in "/etc/init.d/ntp" (script which still exists).
Is this intentional, or is it a bug?
Mine is the same as yours. Opensuse 12.3 Kde 4.11 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 В Thu, 29 Aug 2013 20:32:26 +0200 (CEST) "Carlos E. R." <robin.listas@telefonica.net> пишет:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
This paragraph:
## Path: System/Environment/Clock ## Description: Information about your timezone and time ## Type: string(-u,--utc,--localtime) ## ServiceRestart: boot.clock ## Command: /sbin/refresh_initrd # # Set to "-u" if your system clock is set to UTC, and to "--localtime" # if your clock runs that way. # HWCLOCK="-u"
has been replaced with
## Path: System/Environment/Clock ## Description: Information about your timezone and time ## Type: string(Europe/Berlin,Europe/London,Europe/Paris) ## ServiceRestart: boot.clock ## Command: /sbin/refresh_initrd # # Be aware that the time reference of the CMOS/HW clock has been # forwarded to /etc/adjtime, the file used by hwclock(8) and # systemd(1) as reference for the CMOS/HW clock.
Ie, the «HWCLOCK="-u"» line has dissapeared - in two different computers running 12.3, at least.
The variable is important, it is sourced in "/etc/init.d/ntp" (script which still exists).
Is this intentional, or is it a bug?
rpm -q --changelog yast2-country ... * Thu May 31 2012 jsuchome@suse.cz - - save HW clock status to /etc/adjtime instead of sysconfig/clock (bnc#764690) - - 2.22.6 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlIhh7YACgkQR6LMutpd94zRggCfXs2WjdPDa7ZPucuoUpf1VqTH A6wAn2zI4MJ7vMijw0V0tDtTOnZ78noE =dsOJ -----END PGP SIGNATURE----- N�����r��y隊Z)z{.�ﮞ˛���m�)z{.��+�:�{Zr�az�'z��j)h���Ǿ� ޮ�^�ˬz��
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Saturday, 2013-08-31 at 10:05 +0400, Andrey Borzenkov wrote:
Is this intentional, or is it a bug?
rpm -q --changelog yast2-country ... * Thu May 31 2012 jsuchome@suse.cz - save HW clock status to /etc/adjtime instead of sysconfig/clock (bnc#764690) - 2.22.6
IMHO, that's a bad decision. That file is destroyed as part of the current recovery procedures. - -- Cheers, Carlos E. R. (from 12.3 x86_64 "Dartmouth" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlIiLaoACgkQtTMYHG2NR9VJ0QCfRIWwS/mmhnobjWlYMG+EQUvU x4cAn286SnNT7X+TDrcFBsbBatNcilUY =2nkI -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2013-08-31 19:53 (GMT+0200) Carlos E. R. composed:
rpm -q --changelog yast2-country ... * Thu May 31 2012 jsuchome@suse.cz - save HW clock status to /etc/adjtime instead of sysconfig/clock (bnc#764690) - 2.22.6
IMHO, that's a bad decision.
That file is destroyed as part of the current recovery procedures.
/etc/adjtime only needs to be written once. So, # chattr +i /etc/adjtime WFM, not that I ever need "recovery procedures". -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2013-08-31 20:38, Felix Miata wrote:
On 2013-08-31 19:53 (GMT+0200) Carlos E. R. composed:
That file is destroyed as part of the current recovery procedures.
/etc/adjtime only needs to be written once. So,
Not true.
WFM, not that I ever need "recovery procedures".
You are fortunate. People that double boot, specially when the other system is Windows, who insists on the CMOS clock being localtime, often trash the adjtime file contents. As a result, the clock shifts several hours on every boot (maybe not an integer number of hours). The cure on those cases was to set the system clock manually, transfer contents to cmos clock, and then erase the adjtime file, in the knowledge that rebooting would set it up correctly. Now instead I'll have (often it is me who guides these people) to tell them a procedure to recreate the file correctly, for people that do not even know if the cmos is running local or utc time or why that is important. - -- Cheers / Saludos, Carlos E. R. (from 12.3 x86_64 "Dartmouth" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlIiOgsACgkQtTMYHG2NR9X/sQCdHUTMf8DyqL7gXTBpI7w1qO3I j0IAnipLEnErrsBp9KXVEWSbUOUHqxVY =vYaC -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2013-08-31 2046 (GMT+0200) Carlos E. R. composed:
On 2013-08-31 20:38, Felix Miata wrote:
/etc/adjtime only needs to be written once. So,
Not true.
Here it needs to be written once per system installation, if that often considering some "installations" are upgrades. Maybe yours don't look like mine: 0.0 0 0.0 0 LOCAL
WFM, not that I ever need "recovery procedures".
You are fortunate.
Multibooting enables matter of course repair by just booting something else rather than some kind of "recovery" boot.
People that double boot, specially when the other system is Windows,
I don't have any double boot systems. OTOH, I have more than two dozen multiboot (>1 installed OS) systems, at least 1/4 of which include Windows.
who insists on the CMOS clock being localtime,
I have two systems not using localtime. Not using localtime on every system on a LAN on which any machine uses localtime can be a big PITA.
often trash the adjtime
Haven't seen it happen here since I started preserving the originals. I don't recall ever seeing it. -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2013-08-31 21:27, Felix Miata wrote:
On 2013-08-31 2046 (GMT+0200) Carlos E. R. composed:
Maybe yours don't look like mine:
0.0 0 0.0 0 LOCAL
That means that you are not using the file. There are no adjustments to your clock. Telcontar:~ # cat /etc/adjtime -0.489881 1377063937 0.000000 1377063937 UTC Telcontar:~ # That's a typical file. -- Cheers / Saludos, Carlos E. R. (from 12.3 x86_64 "Dartmouth" at Telcontar)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 В Sat, 31 Aug 2013 20:46:35 +0200 "Carlos E. R." <carlos.e.r@opensuse.org> пишет:
People that double boot, specially when the other system is Windows, who insists on the CMOS clock being localtime, often trash the adjtime file contents. As a result, the clock shifts several hours on every boot (maybe not an integer number of hours).
I do not understand what is to trash there. The first two lines are legacy that nobody relies upon anyway. What this thread is about is the third line which is never changed by hwclock itself unless you explicitly instruct it to do so.
The cure on those cases was to set the system clock manually, transfer contents to cmos clock, and then erase the adjtime file, in the knowledge that rebooting would set it up correctly.
I do not understand why you need to remove /etc/adjtime helps here. Either LOCAL/UTC was set correctly or not. If it was no correctly set then most likely because /etc/sysconfig/clock was not set correctly and it will be recreated with wrong value again.
Now instead I'll have (often it is me who guides these people) to tell them a procedure to recreate the file correctly, for people that do not even know if the cmos is running local or utc time or why that is important.
If people do not know whether they are running local or UTC, how are you going to trust their /etc/sysconfig/clock then? It is user decision in the first place, whether it is stored in /etc/sysconfig/clock or /etc/adjtime is not important. The right procedure to fix dual boot with Windows is to go to YaST and set local time instead of UTC. Which will store the correct value in /etc/adjtime. Where is the problem? -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlIizRkACgkQR6LMutpd94yTMwCeIlMPzmS3Vlt7JnCSV23aXFJV cdcAn2BYanolCtoCzhNBlrkLi4DFj+1Q =nMDH -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Content-ID: <alpine.LNX.2.00.1309011359110.7832@Telcontar.valinor> On Sunday, 2013-09-01 at 09:14 +0400, Andrey Borzenkov wrote:
В Sat, 31 Aug 2013 20:46:35 +0200 "Carlos E. R." <> пишет:
People that double boot, specially when the other system is Windows, who insists on the CMOS clock being localtime, often trash the adjtime file contents. As a result, the clock shifts several hours on every boot (maybe not an integer number of hours).
I do not understand what is to trash there. The first two lines are legacy that nobody relies upon anyway. What this thread is about is the third line which is never changed by hwclock itself unless you explicitly instruct it to do so.
The first two lines are used by hwclock. The exact method varies between openSUSE releases. Basically, cpu time is set from cmos clock on boot. On halt system time is copied to cmos, but first it is compared to see the difference: a value for clock shift per time unit is stored in those first lines of the adjtime file. On next boot, hwclock obtains the time from cmos, and shifts it with the difference value multiplied by the time since last cmos time set. This procedure compensates for the inacuracies (drift) in the cmos clock. Remember that not everybody can use ntp. Hwclock has always stored the utc/local word there. This is documented.
The cure on those cases was to set the system clock manually, transfer contents to cmos clock, and then erase the adjtime file, in the knowledge that rebooting would set it up correctly.
I do not understand why you need to remove /etc/adjtime helps here. Either LOCAL/UTC was set correctly or not. If it was no correctly set then most likely because /etc/sysconfig/clock was not set correctly and it will be recreated with wrong value again.
When the adjustment shift in /etc/adjtime is incorrect, the file has to be deleted and recreated correctly. UTC/LOCAL is irrelevant, but the correct word has to be written. If you adjust manually the clock by hours up or down, when the sihift per unit time is calculated, it is wrong by hours. When the time is set on next boot, it is set VERY incorrectly. People start a loop of adjusting the clock after booting, and getting it worse on next reboot. It happens typically to people double booting. As the shift calculation is off, the only cure is to delete te adjtime file.
Now instead I'll have (often it is me who guides these people) to tell them a procedure to recreate the file correctly, for people that do not even know if the cmos is running local or utc time or why that is important.
If people do not know whether they are running local or UTC, how are you going to trust their /etc/sysconfig/clock then? It is user decision in the first place, whether it is stored in /etc/sysconfig/clock or /etc/adjtime is not important.
The right procedure to fix dual boot with Windows is to go to YaST and set local time instead of UTC. Which will store the correct value in /etc/adjtime. Where is the problem?
People do not remember what they did at install time. If on doubt, they hit [ENTER]. The contents of the /etc/sysconfig/clock file allowed us helpers to know what to do, even if the user did not know. Now it is impossible, we have to guess for them. And no, the correct procedure for Windows, since Vista, is to use UTC and tell Windows to also use UTC. This, again, is documented. <http://en.opensuse.org/SDB%3AConfiguring_the_clock#Other_OS> Hint: find out who wrote the article. - -- Cheers, Carlos E. R. (from 12.3 x86_64 "Dartmouth" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlIjLFIACgkQtTMYHG2NR9V+gwCfeToGks8L+Al2M2hon3oSrCOb BKkAn2p208gCcHl40mAtcALAElqVsUL7 =yCKf -----END PGP SIGNATURE-----
On Sun, Sep 01, 2013 at 02:00:18PM +0200, Carlos E. R. wrote:
Content-ID: <alpine.LNX.2.00.1309011359110.7832@Telcontar.valinor>
On Sunday, 2013-09-01 at 09:14 +0400, Andrey Borzenkov wrote:
В Sat, 31 Aug 2013 20:46:35 +0200 "Carlos E. R." <> пишет:
People that double boot, specially when the other system is Windows, who insists on the CMOS clock being localtime, often trash the adjtime file contents. As a result, the clock shifts several hours on every boot (maybe not an integer number of hours).
I do not understand what is to trash there. The first two lines are legacy that nobody relies upon anyway. What this thread is about is the third line which is never changed by hwclock itself unless you explicitly instruct it to do so.
The first two lines are used by hwclock. The exact method varies between openSUSE releases.
Basically, cpu time is set from cmos clock on boot. On halt system time is copied to cmos, but first it is compared to see the difference: a value for clock shift per time unit is stored in those first lines of the adjtime file.
On next boot, hwclock obtains the time from cmos, and shifts it with the difference value multiplied by the time since last cmos time set.
This procedure compensates for the inacuracies (drift) in the cmos clock.
Remember that not everybody can use ntp.
Hwclock has always stored the utc/local word there.
This is documented.
Exactly ... and hwclock always uses the third line if not specified the option --noadjfile ... and hwclock only adjusts the Hardware Clock with the option --adjust which should be used before doing --hctosys. As you may see from the manual page of hwclock(8) this tool is now part of the util-linux project and it has changed. E.g. the option --systz has become part of hwclock(8) which does the same as my old warpclock utility.
The cure on those cases was to set the system clock manually, transfer contents to cmos clock, and then erase the adjtime file, in the knowledge that rebooting would set it up correctly.
I do not understand why you need to remove /etc/adjtime helps here. Either LOCAL/UTC was set correctly or not. If it was no correctly set then most likely because /etc/sysconfig/clock was not set correctly and it will be recreated with wrong value again.
When the adjustment shift in /etc/adjtime is incorrect, the file has to be deleted and recreated correctly. UTC/LOCAL is irrelevant, but the correct word has to be written.
If you adjust manually the clock by hours up or down, when the sihift per unit time is calculated, it is wrong by hours. When the time is set on next boot, it is set VERY incorrectly. People start a loop of adjusting the clock after booting, and getting it worse on next reboot. It happens typically to people double booting.
As the shift calculation is off, the only cure is to delete te adjtime file.
Nevertheless ... hwclock(8) is not used by systemd as systemd does this by its self and for this it uses /etc/adjtime to get LOCAL(time)/UTC correct: /home/werner> grep /etc/adjtime /etc/systemd/ /usr/lib/systemd/ -rs Binary file /usr/lib/systemd/systemd matches Binary file /usr/lib/systemd/systemd-timedated matches to use the adjust functionality of hwclock(8) you may create a systemd unit file like hwclock-adjust.service which should be type oneshot and does use ExecStart=/usr/sbin/hwclock --adjust ExecStart=/usr/sbin/hwclock --hwclock and at shutdown you may need a second unit hwclock-systohc.service also of type oneshot with ExecStart=/usr/sbin/hwclock --systohc
Now instead I'll have (often it is me who guides these people) to tell them a procedure to recreate the file correctly, for people that do not even know if the cmos is running local or utc time or why that is important.
If people do not know whether they are running local or UTC, how are you going to trust their /etc/sysconfig/clock then? It is user decision in the first place, whether it is stored in /etc/sysconfig/clock or /etc/adjtime is not important.
The right procedure to fix dual boot with Windows is to go to YaST and set local time instead of UTC. Which will store the correct value in /etc/adjtime. Where is the problem?
People do not remember what they did at install time. If on doubt, they hit [ENTER]. The contents of the /etc/sysconfig/clock file allowed us helpers to know what to do, even if the user did not know.
Now it is impossible, we have to guess for them.
And no, the correct procedure for Windows, since Vista, is to use UTC and tell Windows to also use UTC. This, again, is documented.
<http://en.opensuse.org/SDB%3AConfiguring_the_clock#Other_OS>
Hint: find out who wrote the article.
;) Werner -- "Having a smoking section in a restaurant is like having a peeing section in a swimming pool." -- Edward Burr
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sunday, 2013-09-01 at 14:43 +0200, Dr. Werner Fink wrote:
On Sun, Sep 01, 2013 at 02:00:18PM +0200, Carlos E. R. wrote:
...
This is documented.
Exactly ... and hwclock always uses the third line if not specified the option --noadjfile ... and hwclock only adjusts the Hardware Clock with the option --adjust which should be used before doing --hctosys.
As you may see from the manual page of hwclock(8) this tool is now part of the util-linux project and it has changed. E.g. the option --systz has become part of hwclock(8) which does the same as my old warpclock utility.
Ah, this is new. ...
Nevertheless ... hwclock(8) is not used by systemd as systemd does this by its self and for this it uses /etc/adjtime to get LOCAL(time)/UTC correct:
Ah!
/home/werner> grep /etc/adjtime /etc/systemd/ /usr/lib/systemd/ -rs Binary file /usr/lib/systemd/systemd matches Binary file /usr/lib/systemd/systemd-timedated matches
to use the adjust functionality of hwclock(8) you may create a systemd unit file like hwclock-adjust.service which should be type oneshot and does use
ExecStart=/usr/sbin/hwclock --adjust ExecStart=/usr/sbin/hwclock --hwclock
and at shutdown you may need a second unit hwclock-systohc.service also of type oneshot with
ExecStart=/usr/sbin/hwclock --systohc
Mmmm... more systemd takeovers. Then the "/etc/sysconfig/clock" file in my computer is wrong: ## Description: Correct systematic drift of the HW clock ## Type: list(yes,no,) # # Add or subtract time from the Hardware Clock to account for # systematic drift since the last time the clock was set or # adjusted. By default off as this can cause trouble. For # systems using localtime for HW clock this will ignored. # USE_ADJUST="no" Setting it to yes would not work. - -- Cheers, Carlos E. R. (from 12.3 x86_64 "Dartmouth" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlIjeRgACgkQtTMYHG2NR9VOMwCfVvwx/XHp0nw2Gc80T/fJU/2y /IMAoIcY1eICKIsY0c33Ce+L+FwtJUtE =gKfu -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 В Sun, 1 Sep 2013 14:00:18 +0200 (CEST) "Carlos E. R." <carlos.e.r@opensuse.org> пишет:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Content-ID: <alpine.LNX.2.00.1309011359110.7832@Telcontar.valinor>
On Sunday, 2013-09-01 at 09:14 +0400, Andrey Borzenkov wrote:
В Sat, 31 Aug 2013 20:46:35 +0200 "Carlos E. R." <> пишет:
People that double boot, specially when the other system is Windows, who insists on the CMOS clock being localtime, often trash the adjtime file contents. As a result, the clock shifts several hours on every boot (maybe not an integer number of hours).
I do not understand what is to trash there. The first two lines are legacy that nobody relies upon anyway. What this thread is about is the third line which is never changed by hwclock itself unless you explicitly instruct it to do so.
The first two lines are used by hwclock. The exact method varies between openSUSE releases.
Basically, cpu time is set from cmos clock on boot. On halt system time is copied to cmos, but first it is compared to see the difference: a value for clock shift per time unit is stored in those first lines of the adjtime file.
On next boot, hwclock obtains the time from cmos, and shifts it with the difference value multiplied by the time since last cmos time set.
Please show me which script on openSUSE 12.3 and above calls hwclock during boot and shutdown. The only one I am aware of is /etc/init.d/ntp and only once on boot to set CMOS after time was synced and only if explicitly enabled.
This procedure compensates for the inacuracies (drift) in the cmos clock.
Remember that not everybody can use ntp.
If you do not use NTP, you do not have correct time anyway. How exactly is one incorrect time better than another incorrect time?
Hwclock has always stored the utc/local word there.
Not always - only if you explicitly call it with --local or --utc.
This is documented.
The cure on those cases was to set the system clock manually, transfer contents to cmos clock, and then erase the adjtime file, in the knowledge that rebooting would set it up correctly.
I do not understand why you need to remove /etc/adjtime helps here. Either LOCAL/UTC was set correctly or not. If it was no correctly set then most likely because /etc/sysconfig/clock was not set correctly and it will be recreated with wrong value again.
When the adjustment shift in /etc/adjtime is incorrect, the file has to be deleted and recreated correctly. UTC/LOCAL is irrelevant, but the correct word has to be written.
If you adjust manually the clock by hours up or down, when the sihift per unit time is calculated, it is wrong by hours. When the time is set on next boot, it is set VERY incorrectly.
Once more - there is NO place in openSUSE where /etc/adjtime is used to set system time from CMOS on boot - this is done by kernel. Nor is there any place where CMOS is set from system time on shutdown - this is normally done automatically by kernel.
The right procedure to fix dual boot with Windows is to go to YaST and set local time instead of UTC. Which will store the correct value in /etc/adjtime. Where is the problem?
People do not remember what they did at install time. If on doubt, they hit [ENTER]. The contents of the /etc/sysconfig/clock file allowed us helpers to know what to do, even if the user did not know.
Now it is impossible, we have to guess for them.
By your own word ("if in doubt, they hit [ENTER}") this file cannot be trusted, at which point you are free to decide whether to use local or utc.
And no, the correct procedure for Windows, since Vista, is to use UTC and tell Windows to also use UTC.
Good. Now you finally give decision criteria whether to use UTC or LOCAL which does not depend on /etc/sysconfig/hwclock in any way :) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlIjO4sACgkQR6LMutpd94xWdwCfW+KM3zfwfR0qxkTTT9F5fNLX yY4AoLfd/+D6KjiWOWV6uois2szETHUf =vdov -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sunday, 2013-09-01 at 17:05 +0400, Andrey Borzenkov wrote:
Please show me which script on openSUSE 12.3 and above calls hwclock during boot and shutdown. The only one I am aware of is /etc/init.d/ntp and only once on boot to set CMOS after time was synced and only if explicitly enabled.
I can't. You have silently removed features while implementing systemd. This is not documented in the release notes for 12.3.
Remember that not everybody can use ntp.
If you do not use NTP, you do not have correct time anyway. How exactly is one incorrect time better than another incorrect time?
ntp is not the only method to keep accurate time. If you read the hwclock (and ntp) manuals you may learn how this was done without network time references.
Hwclock has always stored the utc/local word there.
Not always - only if you explicitly call it with --local or --utc.
which the openSUSE scripts, and previously SuSE scripts, have always done.
Once more - there is NO place in openSUSE where /etc/adjtime is used to set system time from CMOS on boot - this is done by kernel. Nor is there any place where CMOS is set from system time on shutdown - this is normally done automatically by kernel.
It is not done because you have removed it. 12.1 /etc/init.d/boot.clock: boot: if test "$USE_ADJFILE" = yes ; then # # For UTC calculate adjtime # if test ! -s /etc/adjtime ; then { echo "0.0 0 0.0" echo "0" echo "UTC" } > /etc/adjtime else test -w /etc/adjtime && adjfile_thirdline fi rtc_rule /sbin/hwclock $HWCLOCK --adjust halt: if test "$USE_ADJFILE" = yes ; then /sbin/hwclock --systohc $HWCLOCK else # Change any /etc/adjtime left over test -w /etc/adjtime && adjfile_thirdline /sbin/hwclock --systohc $HWCLOCK --noadjfile fi That is how what I described was done. Now you have replaced it by something else, and hidden it in binaries, so we can not know what is done :-/ (and no, don't tell me to read the sources) - -- Cheers, Carlos E. R. (from 12.3 x86_64 "Dartmouth" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlIje7wACgkQtTMYHG2NR9VFQQCcC/G8WlSGqwxmkTvO0Q1hjZCY wNcAoJfaeduLDQX82IJPqy7aF/FC1Ewx =fHIC -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Andrey Borzenkov wrote:
If you do not use NTP, you do not have correct time anyway. How exactly is one incorrect time better than another incorrect time?
Being a minute early is better than being an hour late ? -- Per Jessen, Zürich (21.9°C) http://www.dns24.ch/ - free DNS hosting, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
В Wed, 04 Sep 2013 13:09:48 +0200 Per Jessen <per@computer.org> пишет:
Andrey Borzenkov wrote:
If you do not use NTP, you do not have correct time anyway. How exactly is one incorrect time better than another incorrect time?
Being a minute early is better than being an hour late ?
You took my sentence out of context. Without reliable time source there is no way to know which of RTC and system time is more stable. So decision which one of the free running clocks should be synced to another is entirely arbitrary. There is no technical reason to state that syncing RTC to system time on shutdown is always better than not doing it. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Carlos E. R. wrote:
And no, the correct procedure for Windows, since Vista, is to use UTC and tell Windows to also use UTC. This, again, is documented.
Are the file time stamps now in UTC? This has long been a problem with Windows. When you work across time zones, as I have done, you don't know what the true file time is. Many years ago, when I worked for IBM, I had access to domains across Canada. When I logged into a domain in a different time zone, my computer clock would change. This was on OS/2, but it's the same issue as with Windows. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sunday, 2013-09-01 at 10:35 -0400, James Knott wrote:
Carlos E. R. wrote:
And no, the correct procedure for Windows, since Vista, is to use UTC and tell Windows to also use UTC. This, again, is documented.
Are the file time stamps now in UTC? This has long been a problem with Windows. When you work across time zones, as I have done, you don't know what the true file time is.
Notice that the above recomendation is for the CMOS or hardware clock, not the system clock, which does not change. FAT stores local times, but NTFS uses some kind of UTC. I don't remember the details, but the wikipedia does: <http://en.wikipedia.org/wiki/Ntfs#Universal_time> +++··································· Universal time For historical reasons, the versions of Windows that do not support NTFS all keep time internally as local zone time, and therefore so do all file systems other than NTFS that are supported by current versions of Windows. However, Windows NT and its descendants keep internal timestamps as UTC and make the appropriate conversions for display purposes. Therefore, NTFS timestamps are in UTC. This means that when files are copied or moved between NTFS and non-NTFS partitions, the OS needs to convert timestamps on the fly. But if some files are moved when daylight saving time (DST) is in effect, and other files are moved when standard time is in effect, there can be some ambiguities in the conversions. As a result, especially shortly after one of the days on which local zone time changes, users may observe that some files have timestamps that are incorrect by one hour. Due to the differences in implementation of DST in different jurisdictions, this can result in a potential timestamp error of up to 4 hours in any given 12 months.[54] ···································++- - -- Cheers, Carlos E. R. (from 12.3 x86_64 "Dartmouth" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlIjVZgACgkQtTMYHG2NR9UPpQCcCjDsM07A+1IWbeb8Y70XHvYc iVwAn0EZcVkrPqcaBnSRJm5N/AXuI1ew =1nHk -----END PGP SIGNATURE-----
Carlos E. R. wrote:
But if some files are moved when daylight saving time (DST) is in effect, and other files are moved when standard time is in effect, there can be some ambiguities in the conversions. As a result, especially shortly after one of the days on which local zone time changes, users may observe that some files have timestamps that are incorrect by one hour.
Yup, typical Microsoft. Instead of doing things right the first time, they add hacks to fix the problems they create. Don't forget, Windows, and DOS before it came after Unix had been in use for a few years. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2013-09-01 14:00 (GMT+0200) Carlos E. R. composed:
If you adjust manually the clock by hours up or down, when the sihift per unit time is calculated, it is wrong by hours. When the time is set on next boot, it is set VERY incorrectly. People start a loop of adjusting the clock after booting, and getting it worse on next reboot. It happens typically to people double booting.
As the shift calculation is off, the only cure is to delete te adjtime file.
Or rewrite the first two lines to: 0.0 0 0.0 0 and then set the immutable bit to stop it from being changed. -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (10)
-
Andrey Borzenkov
-
Carlos E. R.
-
Carlos E. R.
-
Dr. Werner Fink
-
Felix Miata
-
ianseeks
-
James Knott
-
Joachim Schrod
-
Per Jessen
-
Ys