1 | #!/bin/sh |
---|
2 | # $Id: finish-update.sh,v 1.17 2001-10-23 23:32:37 rbasch 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 | echo "Starting the second stage of the update at `date`." |
---|
19 | . /srvd/usr/athena/lib/update/update-environment |
---|
20 | |
---|
21 | # We get one argument, the new workstation version we're updating to. |
---|
22 | newvers="$1" |
---|
23 | |
---|
24 | . $CONFDIR/rc.conf |
---|
25 | |
---|
26 | # Do auxiliary device installs. |
---|
27 | if [ -s "$AUXDEVS" ]; then |
---|
28 | drvrs=`cat "$AUXDEVS"` |
---|
29 | for i in $drvrs; do |
---|
30 | /srvd/install/aux.devs/$i |
---|
31 | done |
---|
32 | fi |
---|
33 | |
---|
34 | # For a public workstation, remove old and new copies of |
---|
35 | # config files left behind by inst (Irix only). |
---|
36 | # Currently, these are hard-coded in the version script. |
---|
37 | if [ "$PUBLIC" = "true" -a -s "$CONFIGVERS" ]; then |
---|
38 | for i in `cat "$CONFIGVERS"` ; do |
---|
39 | rm -f $i |
---|
40 | done |
---|
41 | fi |
---|
42 | |
---|
43 | # Remove the version script state files. |
---|
44 | rm -f "$CONFCHG" "$CONFVARS" "$AUXDEVS" "$OLDBINS" "$OLDLIBS" "$DEADFILES" |
---|
45 | rm -f "$CONFIGVERS" "$LOCALPACKAGES" "$LINKPACKAGES" "$PATCHES" |
---|
46 | if [ -n "$LOCALPACKAGES" ]; then |
---|
47 | rm -f "$LOCALPACKAGES".* |
---|
48 | fi |
---|
49 | if [ -n "$LINKPACKAGES" ]; then |
---|
50 | rm -f "$LINKPACKAGES".* |
---|
51 | fi |
---|
52 | |
---|
53 | # Convert old attachtab files. |
---|
54 | if [ -f /var/athena/attachtab.old ]; then |
---|
55 | echo "Converting old attachtab to liblocker format." |
---|
56 | /srvd/usr/athena/etc/atconvert /var/athena/attachtab.old \ |
---|
57 | && rm -f /var/athena/attachtab.old |
---|
58 | fi |
---|
59 | |
---|
60 | echo "Updating version" |
---|
61 | echo "Athena Workstation ($HOSTTYPE) Version $newvers `date`" >> \ |
---|
62 | $CONFDIR/version |
---|
63 | |
---|
64 | # Re-customize the workstation |
---|
65 | if [ "$PUBLIC" = "true" ]; then |
---|
66 | rm -rf "$SERVERDIR" |
---|
67 | fi |
---|
68 | |
---|
69 | if [ -d "$SERVERDIR" ]; then |
---|
70 | echo "Running mkserv." |
---|
71 | /srvd/usr/athena/bin/mkserv -v update < /dev/null |
---|
72 | fi |
---|
73 | echo "Finished with update at `date`." |
---|
74 | rm -rf /var/athena/update.running |
---|