Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!think!cirl!earvax!das From: das@earvax.UUCP (Dave Steffens) Newsgroups: net.bugs.4bsd Subject: Ultrix loses time on reboot (with fix) Message-ID: <181@earvax.UUCP> Date: Mon, 11-Aug-86 15:05:21 EDT Article-I.D.: earvax.181 Posted: Mon Aug 11 15:05:21 1986 Date-Received: Wed, 13-Aug-86 03:15:10 EDT Distribution: net Organization: Eaton-Peabody, Mass. Eye & Ear Lines: 39 Index: /etc/rc Ultrix FIX Description: Recently I have been doing device driver development under Ultrix 1.1 on my uVAX. This requires frequent rebooting in order to debug the driver code. I have noticed that the system I am working on loses a **significant** amount of time with respect to another uVAX to which it is networked. Time is never lost over the weekend when I'm not working. To make a long story short, the time loss seems to be caused by some fooling around in /etc/rc to establish the time zone. Some stuff has been added to date(1) but the code in /etc/rc does not make good use of it -- the seconds read from the TOY clock at boot time are thrown away by the code in /etc/rc. Repeat-by: Reboot your Ultrix 1.1 (1.2?) system 10 times. Watch it lose an average of 30 seconds each time. After 10 trys, it will be about 5 minutes slow. Fix: Make the following changes. I have shortened "PERCENT" to "PCT" so that the format string for date fits on an 80 char line. Before you ask -- No, I don't know why they didn't just use "%". 2c2 < PERCENT=% --- > PCT=% 7c7 < dt=`date -u "+${PERCENT}y${PERCENT}m${PERCENT}d${PERCENT}H${PERCENT}M"` --- > dt=`date -u "+${PCT}y${PCT}m${PCT}d${PCT}H${PCT}M.${PCT}S"` -- {harvard,mit-eddie,think}!eplunix!earvax!das David Allan Steffens 243 Charles St., Boston, MA 02114 Eaton-Peabody Laboratory (617) 523-7900 x2748 Mass. Eye & Ear Infirmary