[1460] in Athena Bugs

home help back first fref pref prev next nref lref last post

(VS2) Version 6.0R: /srvd/auto_update

daemon@ATHENA.MIT.EDU (Jonathan I. Kamens)
Fri Dec 2 06:56:50 1988

Date: Fri, 2 Dec 88 06:56:26 EST
From: Jonathan I. Kamens <jik@ATHENA.MIT.EDU>
To: bugs@ATHENA.MIT.EDU
System type, version:	(VS2) Version 6.0R
System name:		binkley
What's wrong:

The beginning of /srvd/auto_update contains the following:

LIBDIR=/srvd/update;    export LIBDIR
VERSION=`/usr/ucb/tail -1 /etc/version | /bin/awk 'NR == 1 {print $5}' `
PATH=/srvd/bin:/srvd/etc:/srvd/etc/athena:/srvd/bin/athena:/urvd/bin:/urvd/etc:/urvd/ucb:/urvd/new:$LIBDIR ; export PATH
export VERSION

Now, the problem happens when the srvd is still attached because some
process has been running and has prevented it from detaching, but the
urvd is detached because it had no such problems.

IN this situation, /usr/ucb/tail is not available to the update
program.  As a result, awk gets no input and prints nothing, so
VERSION is set to an empty string, or something equally inane.

When the version variable is checked in the next case statement, it
doesn't match any of the right things, so it falls through and assumes
that it is supposed to perform the update.  It proceeds to do the
update, and then reboot the workstation.

This causes the workstation to be unavailable during the short period
of time while it is redoing the update and during the reboot.  It also
causes lots of unnecessary disk read/write.

What should have happened:

The script should check to see if /usr/ucb/tail is executable.  If it
is not, the script should exit gracefully, perhaps after printing some
message mentioning this fact.  It should *not* go ahead and try to do
the update anyway.

  --> Jonathan Kamens
      Project Athena Watchmaker
      SIPB (Student Information Processing Board) Member
      Volunteer OLC Consultant
      jik@ATHENA.MIT.EDU

home help back first fref pref prev next nref lref last post