#!/bin/csh -f
#+
#OSIRIS library of scripts
#
#NAME
#     aohatch - opens or closes the AO hatch cover
#
#SYNOPSIS
#     aohatch [action]
#
#DESCRIPTION
#     opens or closes the AO hatch cover, or, if no arguments have been given, 
#     reports the current status of the cover.
#
#     Note that the keyword to move the hatch is different than the keyword
#     to check the hatch.
#
#OPTIONS
#     action
#          (optional) specifies one of [open,close,closed]
#
#EXAMPLES
#     aohatch close
#          The ao hatch will be closed
#
#ENVIRONMENT VARIABLES
#     none
#
#FILES
#     none
#
#SERVERS & KEYWORDS
#     service = ao
#          keywords: ifaostat, ifaocmd
#
#SCRIPTS CALLED
#     help, syncheck
#
#EXIT STATUS
#     0 - normal exit, no error
#     1 - script aborted by an interrupt
#     2 - syncheck error
#     3 - error parsing command line input
#     other errors...
#
#SEE ALSO
#     ???
#-
#
# Modification History:
# 20050219 - MB: Adapted from NIRC2 scripts
# 20130213 - jlyke: OSIRIS is now on K1

# Boiler plate for "-h" support for command autohelp.

if ("$1" == "-h") then
    help $0 | more
    exit $status
endif

rsh k1aoserver -l k1obsao aohatch $*

exit