#!/bin/sh
#
#
#    Copyright (c) 1996-2006 Brocade Communications Systems, Inc.
#    All rights reserved.
#
#
# NAME
#      diagenablepost - enable diagnostic POST
# 
# SYNOPSIS
#      diagenablepost
# 
# AVAILABILITY
#      admin
# 
# DESCRIPTION
#      This  command  will  enable  diagnostic  POST(Power-On  Self
#      Test).  Diagnostic POST divides into  two  separate  phases,
#      POST  Phase  I  and POST Phase II. POST Phase I mainly tests
#      hardware soundness and POST Phase II tests system  function-
#      ality. It does not require a reboot to take effect.
# 
# EXAMPLES
#      > diagenablepost
#      Config update Succeeded
#      Post disable is now 0 (Enabled).
# 
# SEE ALSO
#      diagdisablepost(1d)
# 

#Check RBAC permission on command
/fabos/libexec/rbac_check `/bin/basename $0`

if [ $? -ne 0 ]; then
    exit 127
fi

if [ -f /var/diagd.skippost ] ; then
   rm -f /var/diagd.skippost  > /dev/null 2>&1
fi

diagpost 1
