From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,e6d38aeec2b890fc X-Google-Attributes: gid111c93,public From: "C. Ray Ng" Subject: Re: Clock starts up with wrong date. Date: 1998/11/02 Message-ID: <363DEEAF.9A2237C6@cornell.edu>#1/1 X-Deja-AN: 407617056 Content-Transfer-Encoding: 7bit References: <35D36FB5.47555D3D@cig.mot.com> <6ur9nt$6j2$1@news.onramp.net> <6uraqf$amm$1@vixen.cso.uiuc.edu> <70i6he$m51@linde.she.de> <70iang$98h$1@cabrera.haiti.cs.uni-potsdam.de> <711ln7$u@linde.she.de> <363A876F.167E@digital.com> Content-Type: text/plain; charset=us-ascii Organization: Cornell University Mime-Version: 1.0 Newsgroups: comp.os.linux.alpha Jay A Estabrook wrote: > > NOTE: the below is true for *ALL* Linux/Alpha platforms. > > --------------------------------------------------------- > > ARC console and SRM console keep dates in the time-of-year (TOY) clock > in slightly different formats (actually, only the "year" field differs). > > The "/sbin/clock" binary normally expects the format which SRM uses; you > can, however, tell it to expect ARC format instead, using the "-A" flag. > Thus, to read the clock when its kept in ARC format, say "clock -r -A", > and to write it, "clock -w -A". If its not written in the expected > format, > the console (ARC or SRM) will prolly complain about it the next time it > has a chance... :-\ > > The best way to ensure you're using the correct format, is to set the > date > via the console's date-setting facility; under ARC, it's a menu item > some > place, under SRM it's a command (IIRC; try "help date"). > > Then you must ensure that the "clock" call in the RH script > /etc/rc.d/rc.sysconfig KNOWS WHAT FORMAT TO READ THE TOY IN!!!! > The problem is that the RH install/update scripts ask the users what the clock format to use ONLY at the end of installation. All of us using ARC clock would have the time stamp wrong all over the places by then. A lot of us wrote small script/program to reset the year afterward and hope that one day RedHat would fix it! It didn't for RH 4.0, 4.1, 4.2, 5.0 and 5.1. But we can't fix those already in the RPM database, nor for example, the time in the /proc directory. It breaks some other tools that compares time stamp for updates, sanitary check etc. Is it posssible to detect the clock format somehow, or RedHat installation script be changed to ask the users before it starts to write any files? Is RedHat watching this thread? > If you're using ARC console to boot MILO/kernel, do: > > 1. running RH 4.1, make sure /etc/sysconfig/clock contains: > > CLOCKMODE="ARC" > > 2. running RH 4.2, or later, make sure /etc/sysconfig/clock contains > (at least): > > ARC=true > > Now, If you're using SRM console to directly boot a kernel, then: > > 1. RH 4.1, same file, set CLOCKMODE="" > > 2. RH 4.2, or later, same file, set ARC=false > > Refer to /etc/rc.d/rc.sysconfig for details about how the above are used > to call "clock" with the appropriate arguments. > > --Jay++ -- C. Ray Ng Tel: (607) 255-4882 Wilson Synchrotron Lab Fax: (607) 255-8062 Cornell University Internet: crn1@cornell.edu Ithaca, NY 14853 http://www.lns.cornell.edu