Revision 23740,
1.0 KB
checked in by broder, 16 years ago
(diff) |
In moira:
* New CVS snapshot (Trac: #195)
* Drop patches that have been incorporated upstream.
* Update to build without krb4 on systems that no longer have it.
This doesn't build yet on squeeze, which lacks a krb4 library, but I'm
committing now before I start hacking away at a patch to fix that.
|
-
Property svn:executable set to
*
|
Line | |
---|
1 | #!/bin/sh |
---|
2 | # |
---|
3 | # $Header: /afs/athena.mit.edu/astaff/project/moiradev/repository/moira/gen/ip-billing.sh,v 1.2 2002-03-19 22:07:06 zacheiss Exp $ |
---|
4 | |
---|
5 | PATH=/usr/bin:/bin:/usr/sbin:/sbin |
---|
6 | |
---|
7 | if [ -d /var/athena ] && [ -w /var/athena ]; then |
---|
8 | exec >/var/athena/moira_update.log 2>&1 |
---|
9 | else |
---|
10 | exec >/tmp/moira_update.log 2>&1 |
---|
11 | fi |
---|
12 | |
---|
13 | # The following exit codes are defined and MUST BE CONSISTENT with the |
---|
14 | # error codes the library uses: |
---|
15 | MR_MISSINGFILE=47836473 |
---|
16 | MR_TARERR=47836476 |
---|
17 | MR_MKCRED=47836474 |
---|
18 | |
---|
19 | OUTFILE=/var/tmp/ip-billing.out |
---|
20 | OUTDIR=/var/tmp/ip-billing.dir |
---|
21 | |
---|
22 | # Alert if the output file doesn't exist |
---|
23 | test -r $OUTFILE || exit $MR_MISSINGFILE |
---|
24 | |
---|
25 | # Make a temporary directory to unpack files into. |
---|
26 | rm -rf $OUTDIR |
---|
27 | mkdir $OUTDIR || exit $MR_MKCRED |
---|
28 | cd $OUTDIR || exit $MR_MKCRED |
---|
29 | |
---|
30 | # unpack the file |
---|
31 | tar xpf $OUTFILE || exit $MR_TARERR |
---|
32 | for i in ctl dat; do |
---|
33 | if [ ! -f moira.$i ]; then |
---|
34 | exit $MR_MISSINGFILE |
---|
35 | fi |
---|
36 | mv moira.$i /var/tmp |
---|
37 | done |
---|
38 | |
---|
39 | # cleanup |
---|
40 | cd / |
---|
41 | rm -rf $OUTDIR |
---|
42 | test -f $OUTFILE && rm -f $OUTFILE |
---|
43 | test -f $0 && rm -f $0 |
---|
44 | |
---|
45 | exit 0 |
---|
Note: See
TracBrowser
for help on using the repository browser.