#!/bin/sh
#
#    Copyright (c) 2006 Brocade Communications Systems, Inc.
#    All rights reserved.
#
#    File name:   isSecureMode
#
#    This script exits 0 if not in secure mode and exits 1 if in
#    secure mode.  This is used by other CLI's which do not
#    link with the security library.
#
export PATH=/fabos/sbin:/fabos/bin:/bin:/usr/bin:/sbin

GREP=/bin/grep

# Make sure there's exactly one argument
if ! [ $# -eq 0 ]; then
#	echo Invalid number of arguments: $#
	exit -1
fi

disableMsg=`/fabos/cliexec/secmodeshow | $GREP DISABLED`

if test "$disableMsg" = ""
then
	exit 1
fi

exit 0
