+#!/bin/sh
+# This script performs updates of hesiod files on hesiod servers.
+# $Header$
+
+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
+
+set -x
+
+PATH=/etc:/bin:/usr/bin:/usr/etc:/usr/athena/etc
+export PATH
+
+# The following exit codes are defined and MUST BE CONSISTENT with the
+# error codes the library uses:
+MR_HESFILE=47836472
+MR_MISSINGFILE=47836473
+MR_NAMED=47836475
+MR_TARERR=47836476
+
+umask 022
+
+# File that will contain the necessary information to be updated
+TARFILE=/var/tmp/hesiod.out
+# Directory into which we will empty the tarfile