#!/bin/bash
#
#    Copyright (c) 2011 Brocade Communications Systems, Inc.
#    All rights reserved.
#

print_usage()
{
   echo "  Usage: fcoe_agent_dbg <module_name> cmd arg1 arg2 ..."
   echo "  E.g  : fcoe_agent_dbg fcoe_agent help "
   echo " "
}

if [ "$1" = "--help" ] ; then
   print_usage;
   exit 0
fi

file_name=/proc/fabos/fcoe_agent

# Check if the debug file is present
if  [[ -e $file_name ]]
then
    # Execute the command in to this file
    echo $* > $file_name
    /bin/cat $file_name
else
    echo "debug file not present"
    exit 0
fi
