[15333] in Athena Bugs
logging that we are at an old version
daemon@ATHENA.MIT.EDU (Jonathon Weiss)
Thu Jul 31 01:54:48 1997
From: Jonathon Weiss <jweiss@MIT.EDU>
To: source-reviewers@MIT.EDU
Date: Thu, 31 Jul 1997 01:54:45 EDT
I noticed some weird messages on wslogger.mit.edu, of the form:
Jul 23 07:18:02 ROTCH-33.MIT.EDU -p: user.notice at revision Update
(The specific weirdness I'm referring to is that -p and user.notice
show up in the message, rather than controlling the level to which it
was logged.) I believe this is caused by update_ws trying to run
$HOSTNAME, which used to be set to hostname or /usr/bsd/hostname, but
is no longer set at all. The following patch should just use the
value out of rc.conf, although it will ensure that $HOST is set if
rc.conf does not exist.
I'll admit not having tested this patch.
Jonathon
Index: update_ws.sh
===================================================================
RCS file: /afs/dev.mit.edu/source/repository/packs/update/update_ws.sh,v
retrieving revision 1.26
diff -c -r1.26 update_ws.sh
*** update_ws.sh 1997/07/04 00:54:34 1.26
--- update_ws.sh 1997/07/31 05:44:01
***************
*** 85,93 ****
if [ -f "$CONFDIR/rc.conf" ]; then
. "$CONFDIR/rc.conf"
else
! export PUBLIC AUTOUPDATE
PUBLIC=true
AUTOUPDATE=true
fi
# Make sure /var/athena exists (it was introduced in 8.1.0) so we have a
--- 85,94 ----
if [ -f "$CONFDIR/rc.conf" ]; then
. "$CONFDIR/rc.conf"
else
! export PUBLIC AUTOUPDATE HOST
PUBLIC=true
AUTOUPDATE=true
+ HOST=`hostname`
fi
# Make sure /var/athena exists (it was introduced in 8.1.0) so we have a
***************
*** 119,125 ****
# Check if we're already in the middle of an update.
if [ "$VERSION" = Update -o "$VERSION" = Reboot ]; then
if [ ! -f /var/tmp/update.check ]; then
! logger -t `$HOSTNAME` -p user.notice at revision $VERSION
touch /var/tmp/update.check
fi
--- 120,126 ----
# Check if we're already in the middle of an update.
if [ "$VERSION" = Update -o "$VERSION" = Reboot ]; then
if [ ! -f /var/tmp/update.check ]; then
! logger -t $HOST -p user.notice at revision $VERSION
touch /var/tmp/update.check
fi
***************
*** 191,197 ****
us to do it for you. Thank you. -Athena Operations
EOF
if [ ! -f /usr/tmp/update.check ]; then
! logger -t `$HOSTNAME` -p user.notice at revision $VERSION
cp /dev/null /usr/tmp/update.check
fi
--- 192,198 ----
us to do it for you. Thank you. -Athena Operations
EOF
if [ ! -f /usr/tmp/update.check ]; then
! logger -t $HOST -p user.notice at revision $VERSION
cp /dev/null /usr/tmp/update.check
fi