X-Git-Url: http://andersk.mit.edu/gitweb/moira.git/blobdiff_plain/883e2e2b60e615d3d4e6c64f94ed05c7dc9504d7..34a2520c8cd16d1d0446959b62e28d2fe3cbd1c9:/gen/zephyr.sh diff --git a/gen/zephyr.sh b/gen/zephyr.sh index 923ff237..778a19c9 100644 --- a/gen/zephyr.sh +++ b/gen/zephyr.sh @@ -1,6 +1,12 @@ #!/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 @@ -22,7 +28,8 @@ tar xf $TARFILE || exit $MR_TARERR # Copy over each file which is new or has changed for file in *; do if [ -f ../acl/$file ]; then - if cmp -s $file ../acl/$file; then + cmp -s $file ../acl/$file + if [ $? != 0 ]; then mv $file ../acl/$file hup=yes fi @@ -35,7 +42,7 @@ done # HUP zephyrd if needed case $hup in yes) - pid=`ps -ef | awk '/[^]]zephyrd/ { print $2; }' + pid=`ps -ef | awk '/[^\]]zephyrd/ { print $2; }'` kill -HUP $pid sleep 5 ;;