]> andersk Git - moira.git/commitdiff
events.sh to go with events.gen.
authorzacheiss <zacheiss>
Wed, 27 Aug 2003 20:04:27 +0000 (20:04 +0000)
committerzacheiss <zacheiss>
Wed, 27 Aug 2003 20:04:27 +0000 (20:04 +0000)
gen/Makefile.in
gen/events.sh [new file with mode: 0755]

index e017f1dae1033656f51eaf2fa561d5a4acdb9b68..94832c9cf74d47b410ce17389fa1f73f67d79647 100644 (file)
@@ -42,7 +42,7 @@ TARGET=       acl.gen boot.gen dhcp.gen directory.gen hesiod.gen hosts.gen \
        mailhub.gen ndb.gen network.gen nfs.gen pobox.gen \
        postoffice.gen print.gen warehouse.gen winad.gen www.gen zephyr.gen
 
-SCRIPTS=acl.sh aliases.sh boot.sh ca.gen calendar.gen dhcp.sh events.gen \
+SCRIPTS=acl.sh aliases.sh boot.sh ca.gen calendar.gen dhcp.sh events.gen events.sh \
        hesiod.sh ip-billing.gen ip-billing.sh longjobs.gen longjobs.sh \
        mailhub.sh mailman.gen mailman.sh ndb.sh nfs.sh null.sh postoffice.sh \
        print.sh sapprint.gen sapprint.sh spwatch.gen stellar.gen stellar.sh \
diff --git a/gen/events.sh b/gen/events.sh
new file mode 100755 (executable)
index 0000000..f87204e
--- /dev/null
@@ -0,0 +1,28 @@
+#!/bin/sh
+# $Id$
+
+if [ -d /var/athena ] && [ -w /var/athena ]; then 
+    exec >/var/athena/moira_update.log 2>&1
+else 
+    exec >/tmp/moira_update.log 2>&1
+fi
+
+# The following exit codes are defined and MUST BE CONSISTENT with the
+# error codes the library uses:
+MR_MISSINGFILE=47836473
+
+PATH=/bin
+OUTFILE=/export/home/moira-feed/events.out
+
+# Alert if the output file doesn't exist
+test -r $OUTFILE || exit $MR_MISSINGFILE
+
+# Set the perms usefully
+chown root $OUTFILE
+chgrp 0 $OUTFILE
+chmod 644 $OUTFILE
+
+# cleanup
+test -f $0 && rm -f $0
+
+exit 0
This page took 0.048959 seconds and 5 git commands to generate.