Revision 6590,
1.0 KB
checked in by miki, 31 years ago
(diff) |
made more portable
|
Line | |
---|
1 | #!/bin/sh |
---|
2 | # Get cluster information from Hesiod and save it. |
---|
3 | # This is normally exected by /etc/rc and each time a workstation is |
---|
4 | # activated. |
---|
5 | # |
---|
6 | # $Id: save_cluster_info.sh,v 1.7 1993-04-29 19:06:13 miki Exp $ |
---|
7 | # |
---|
8 | # Errors from getcluster guarantee that stdout will be size 0, |
---|
9 | # therefore a size # 0 is a sufficient test. |
---|
10 | # Use old data from last session if getcluster fails. |
---|
11 | |
---|
12 | PATH=/bin:/usr/ucb; export PATH |
---|
13 | |
---|
14 | . /etc/athena/rc.conf |
---|
15 | HOSTNAME=`hostname` |
---|
16 | VERSION=`awk '{vers = $5}; END {print vers}' /etc/athena/version` |
---|
17 | |
---|
18 | if [ "${VERSION}" = "Update" ]; then |
---|
19 | echo "This system is in the middle of an update." |
---|
20 | echo "Please contact Athena Operations." |
---|
21 | exit 1 |
---|
22 | fi |
---|
23 | |
---|
24 | /bin/athena/getcluster -b ${HOSTNAME} ${VERSION} > /tmp/clusterinfo.bsh |
---|
25 | if [ -s /tmp/clusterinfo.bsh ] |
---|
26 | then |
---|
27 | cp /tmp/clusterinfo.bsh /etc/athena/clusterinfo.bsh |
---|
28 | chmod 666 /etc/athena/clusterinfo.bsh 2>/dev/null |
---|
29 | fi |
---|
30 | /bin/athena/getcluster ${HOSTNAME} ${VERSION} > /tmp/clusterinfo |
---|
31 | if [ -s /tmp/clusterinfo ] |
---|
32 | then |
---|
33 | cp /tmp/clusterinfo /etc/athena/clusterinfo |
---|
34 | chmod 666 /etc/athena/clusterinfo 2>/dev/null |
---|
35 | fi |
---|
Note: See
TracBrowser
for help on using the repository browser.