#!/usr/local/bin/perl
# 
# $Header: emdb/sysman/admin/scripts/db/ob/ob_resp.pl /st_emdbsa_11.2/1 2009/02/03 18:27:47 swbalasu Exp $
#
# ob_resp.pl
# 
# Copyright (c) 2007, 2008, Oracle and/or its affiliates.All rights reserved. 
#
#    NAME
#      ob_resp.pl - <one-line expansion of the name>
#
#    DESCRIPTION
#      <short description of component this file declares/defines>
#
#    NOTES
#      <other useful comments, qualifications, etc.>
#
#    MODIFIED   (MM/DD/YY)
#    pfgavin     09/23/08 - 
#    swbalasu    09/18/08 - 
#    swbalasu    09/09/08 - 
#    pfgavin     05/13/08 - 
#    swbalasu    10/30/07 - Creation
#
require "$ENV{EMDROOT}/sysman/admin/scripts/db/ob/ob_common.pl";
init();

$ob_command="$OBTOOL --gui --user $ob_username lshost --short --inservice $ADMIN_HOST";
OBrunOb();

if (checkErrorsAndWarnings() == 0)
{
     if ( rindex($rbug, $ADMIN_HOST) > -1)
     {
        print "em_result=1|1|Up - In service";
     }
     else
     {
        print "em_result=1|0|Up - Not in service";
     }
}
else
{
   print "em_result=0|0|$rbug";
}
exit 0;
