source: trunk/debathena/debathena/clusterinfo/debian/save-cluster-info @ 25017

Revision 25017, 515 bytes checked in by jdreed, 12 years ago (diff)
In clusterinfo: * Don't hardcode version 10 (Trac #753)
  • Property svn:executable set to *
Line 
1#!/bin/sh
2# Get cluster information from Hesiod and save it.
3
4base=/var/run/athena-clusterinfo
5ver=$(lsb_release -sr)
6if [ $(echo "$ver < 10" | bc -q) -eq 1 ]; then
7    ver=10
8fi
9
10getcluster -b $ver > $base.sh.new
11if [ $? -eq 0 -a -s $base.sh.new ]; then
12  chmod 644 $base.sh.new
13  mv -fT $base.sh.new $base.sh
14fi
15
16getcluster $ver > $base.csh.new
17if [ $? -eq 0 -a -s $base.csh.new ]; then
18  chmod 644 $base.csh.new
19  mv -fT $base.csh.new $base.csh
20fi
21
22. $base.sh
23run-parts /usr/share/debathena-clusterinfo/update.d
Note: See TracBrowser for help on using the repository browser.