1 | #!/bin/sh |
---|
2 | # $Id: finish-update.sh,v 1.8 1997-12-06 21:32:12 ghudson Exp $ |
---|
3 | |
---|
4 | # Copyright 1996 by the Massachusetts Institute of Technology. |
---|
5 | # |
---|
6 | # Permission to use, copy, modify, and distribute this |
---|
7 | # software and its documentation for any purpose and without |
---|
8 | # fee is hereby granted, provided that the above copyright |
---|
9 | # notice appear in all copies and that both that copyright |
---|
10 | # notice and this permission notice appear in supporting |
---|
11 | # documentation, and that the name of M.I.T. not be used in |
---|
12 | # advertising or publicity pertaining to distribution of the |
---|
13 | # software without specific, written prior permission. |
---|
14 | # M.I.T. makes no representations about the suitability of |
---|
15 | # this software for any purpose. It is provided "as is" |
---|
16 | # without express or implied warranty. |
---|
17 | |
---|
18 | export PATH CPUTYPE |
---|
19 | CONFDIR=/etc/athena |
---|
20 | LIBDIR=/srvd/usr/athena/lib/update |
---|
21 | SERVERDIR=/var/server |
---|
22 | PATH=/os/bin:/os/etc:/srvd/etc/athena:/srvd/bin/athena:/os/usr/bin:/srvd/usr/athena/etc:/os/usr/ucb:/os/usr/bsd:$LIBDIR:/bin:/etc:/usr/bin:/usr/ucb:/usr/bsd |
---|
23 | HOSTTYPE=`/bin/athena/machtype` |
---|
24 | CPUTYPE=`/bin/athena/machtype -c` |
---|
25 | CONFCHG=/var/athena/update.confchg |
---|
26 | CONFVARS=/var/athena/update.confvars |
---|
27 | AUXDEVS=/var/athena/update.auxdevs |
---|
28 | OLDBINS=/var/athena/update.oldbins |
---|
29 | DEADFILES=/var/athena/update.deadfiles |
---|
30 | |
---|
31 | # We get one argument, the new workstation version we're updating to. |
---|
32 | newvers="$1" |
---|
33 | |
---|
34 | . $CONFDIR/rc.conf |
---|
35 | |
---|
36 | # Do auxiliary device installs. |
---|
37 | if [ -s "$AUXDEVS" ]; then |
---|
38 | drvrs=`cat "$AUXDEVS"` |
---|
39 | for i in $drvrs; do |
---|
40 | /srvd/install/aux.devs/$i |
---|
41 | done |
---|
42 | fi |
---|
43 | |
---|
44 | # Remove the version script state files. |
---|
45 | rm -f "$CONFCHG" "$CONFVARS" "$AUXDEVS" "$OLDBINS" "$DEADFILES" |
---|
46 | |
---|
47 | echo "Updating version" |
---|
48 | echo "Athena Workstation ($HOSTTYPE) Version $newvers `date`" >> \ |
---|
49 | ${CONFDIR}/version |
---|
50 | |
---|
51 | # Re-customize the workstation |
---|
52 | if [ "$PUBLIC" = "true" ]; then |
---|
53 | rm -rf "$SERVERDIR" |
---|
54 | fi |
---|
55 | |
---|
56 | if [ -d "$SERVERDIR" ]; then |
---|
57 | echo "Running mkserv." |
---|
58 | /srvd/usr/athena/bin/mkserv -v update < /dev/null |
---|
59 | fi |
---|