]> andersk Git - moira.git/blobdiff - gen/zephyr.sh
Command line printer manipulation client, and build goo.
[moira.git] / gen / zephyr.sh
index 923ff237ef7d626dcc7a41cc85fedaa59a298ba4..778a19c9c0e052576674819ece3ef12c1fb0a02b 100644 (file)
@@ -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
     ;;
This page took 0.033568 seconds and 4 git commands to generate.