#!/bin/sh # # Update script for Project Athena workstations # # $Id: update_ws,v 1.33 92/05/18 21:01:12 epeisach Exp $ # trap "" 1 15 ROOT="${ROOT-}"; export ROOT CONFDIR="${CONFDIR-/etc/athena}"; export CONFDIR LIBDIR=/srvd/usr/athena/lib/update; export LIBDIR PATH=/bin:/srvd/bin:/srvd/etc:/srvd/etc/athena:/srvd/bin/athena:/srvd/usr/athena/etc:/srvd/usr/bin:/srvd/usr/etc:/srvd/usr/ucb:/usr/bin:/usr/ucb:$LIBDIR ; export PATH if [ ! -d /srvd/bin ]; then exit 1 fi if [ ! -f ${ROOT}/${CONFDIR}/version -a -f ${ROOT}/etc/version ]; then CONFDIR=/etc; export CONFDIR; fi if [ ! -f ${ROOT}/${CONFDIR}/version ]; then echo "Athena Update (???) Version 0.0A Mon Jan 1 00:00:00 EDT 0000" \ > ${ROOT}/${CONFDIR}/version fi NEWVERS=`awk '{a=$5}; END{print a}' /srvd/.rvdinfo` VERSION=`awk '{a=$5}; END{print a}' ${ROOT}/${CONFDIR}/version` export NEWVERS VERSION if [ -f ${ROOT}/${CONFDIR}/rc.conf ]; then . ${ROOT}/${CONFDIR}/rc.conf else PUBLIC=true; export PUBLIC AUTOUPDATE=true; export AUTOUPDATE fi AUTO=false if [ `expr $0 : '.*auto_update'` != "0" ]; then AUTO=true; fi case `echo $VERSION $NEWVERS | awk '(NR==1) { \ if ($1 == "Update") {print "OOPS"} \ else if ($1 >= $2) {print "OK"} \ else if (substr($1,1,3) == substr($2,1,3)) {print "INCR"} \ else {print "FULL"}}'` in OOPS) if [ ! -f /usr/tmp/update.check -a -f /usr/ucb/logger ]; then /usr/ucb/logger -t `/bin/hostname` -p user.notice at revision $VERSION cp /dev/null /usr/tmp/update.check fi echo "This system is in the middle of an update. Please contact" echo "Athena Operations at x3-1410. Thank you. -Athena Operations" exit 1 ;; OK) if [ "${AUTO}" != "true" ]; then echo "It appears you already have this update." fi exit 0 ;; INCR|FULL) ;; esac if [ "${PUBLIC}" = "true" ]; then AUTOUPDATE=true fi if [ "${AUTO}" = "true" -a "${AUTOUPDATE}" != "true" ]; then /bin/cat < /dev/null 2>&1 ;; esac /bin/sh $LIBDIR/do_update < /dev/null /bin/athena/detach -h -n -q -a /bin/sync case "${SYSTEM}" in ULTRIX*) /bin/echo "Auto Update Done, System will now reboot." /bin/sync exec /etc/reboot ;; *) /bin/echo "Auto Update Done, System will reboot in 15 seconds." /bin/sync /bin/sleep 15 exec /etc/reboot -q ;; esac else /bin/sh $LIBDIR/do_update fi echo "Done" exit 0 # This file is the most convenient place to make changes that have to be # applied to all workstations. # # The following is "filler", in case a live-RVD patch has to be performed. # Because live RVD edits are easier if the files are the same length, we # are allowing for some room to make changes to this file. # # 34567890123456789012345678901234567890123456789012345678901234567890 # 34567890123456789012345678901234567890123456789012345678901234567890 # 34567890123456789012345678901234567890123456789012345678901234567890 # 34567890123456789012345678901234567890123456789012345678901234567890 # 34567890123456789012345678901234567890123456789012345678901234567890 # 34567890123456789012345678901234567890123456789012345678901234567890 # 34567890123456789012345678901234567890123456789012345678901234567890 # 34567890123456789012345678901234567890123456789012345678901234567890 # 34567890123456789012345678901234567890123456789012345678901234567890 # 34567890123456789012345678901234567890123456789012345678901234567890 # 34567890123456789012345678901234567890123456789012345678901234567890 # 34567890123456789012345678901234567890123456789012345678901234567890 # 34567890123456789012345678901234567890123456789012345678901234567890 # 34567890123456789012345678901234567890123456789012345678901234567890 # 34567890123456789012345678901234567890123456789012345678901234567890 # 34567890123456789012345678901234567890123456789012345678901234567890 # 34567890123456789012345678901234567890123456789012345678901234567890 # 34567890123456789012345678901234567890123456789012345678901234567890 # 34567890123456789012345678901234567890123456789012345678901234567890 # 34567890123456789012345678901234567890123456789012345678901234567890