uusched and system time

Adri Verhoef a3 at rivm.nl
Wed Feb 20 22:11:27 AEST 1991


>I'm using SCO-SysV/386 3.2.0.
>uusched sometime get's the wrong system time and calls up all
>systems waiting in the queue.
>uucp wrkof  (2/12-15:34:59,17488,7) REMOTE REQUESTED (wrkof!D.odbff33b0bb3 --> odbffm!X.odbffmd33b0 (news))
>uucp wrkof  (2/12-15:35:04,17488,8) OK (conversation complete tty1A 635)
>uucp wrkof  (2/12-6:59:42,17660,0) SUCCEEDED (call to wrkof )
>etc.
>Does anybody know about this problem? Is there a bug fix or is this bug
>replaced in 3.2.2??

This is a cron, uucico and uuxqt problem.  These programs don't have
the TZ-variable set and don't pass $TZ on to the programs that they invoke.
The solution is to set TZ from /etc/TIMEZONE in a new uucico and uuxqt.
Compile the following program with the "-DCICO" and the "-DXQT" cc-flags,
respectively, move the original uucico to .uucico, move the original uuxqt
to .uuxqt, and move the with -DCICO compiled binary to uucico, and move
the with -DXQT compiled binary to uuxqt, and there you go!
-r-xr-xr-x   1 bin      bin         5952 Apr 28  1989 /usr/lib/uucp/uucico
-r-xr-xr-x   1 bin      bin         5948 Apr 28  1989 /usr/lib/uucp/uuxqt

Here is the program:
#!/bin/sh
# This is a shell archive (produced by shar 3.50)
# To extract the files from this archive, save it to a file, remove
# everything above the "!/bin/sh" line above, and type "sh file_name".
#
# made 02/20/1991 11:10 UTC by bin at rivm05
# Source directory /user3/own/sys/uucp/src
#
# existing files will NOT be overwritten unless -c is specified
#
# This shar contains:
# length  mode       name
# ------ ---------- ------------------------------------------
#    891 -rw-r----- uuTZ.c
#
# ============= uuTZ.c ==============
if test -f 'uuTZ.c' -a X"$1" != X"-c"; then
	echo 'x - skipping uuTZ.c (File already exists)'
else
echo 'x - extracting uuTZ.c (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'uuTZ.c' &&
/* /usr/lib/uucp/uucico, /usr/lib/uucp/uuxqt
X * A timezone bug - environment variable TZ is not set by uucico, nor by uuxqt -
X * causes time differences by eg. `rmail'.
X * These versions of uucico(1M) and uuxqt(1M) call
X * '.uucico' and '.uuxqt' (which are the original versions), respectively.
X * Note: This is a workaround.
X */
#include <stdio.h>
X
#ifdef CICO
# define REAL_ONE	"/usr/lib/uucp/.uucico"
static char	RIVM_ID[] = "@(#)uucp:uucico	2.0	(a3)	28 apr 1989";
#endif
#ifdef XQT
# define REAL_ONE	"/usr/lib/uucp/.uuxqt"
static char	RIVM_ID[] = "@(#)uucp:uuxqt	2.0	(a3)	28 apr 1989";
#endif
#define TZSIZE	16
X
main(c, v)
char **	v;
{
X	FILE *	pp;
X	char	buf[TZSIZE];
X	char *	p;
X
X	if ((pp = popen(". /etc/TIMEZONE;echo \"TZ=$TZ\"", "r")) != NULL) {
X		if ((p = fgets(buf, TZSIZE, pp)) != NULL) {
X			while (*p && *p != '\n') p++;
X			*p = '\0';
X			putenv(buf);
X		}
X	}
X	execv(REAL_ONE, v);
}
SHAR_EOF
chmod 0640 uuTZ.c ||
echo 'restore of uuTZ.c failed'
Wc_c="`wc -c < 'uuTZ.c'`"
test 891 -eq "$Wc_c" ||
	echo 'uuTZ.c: original size 891, current size' "$Wc_c"
fi
exit 0



More information about the Comp.unix.xenix.sco mailing list