#!/bin/bash
#
#	Copyright (c) 2004-2016 Brocade Communications Systems, Inc.
#	All rights reserved.
#
#	Description:
#		This script will be invoked as part of HASM-1015 log to
#		collect the required logs and reboot the system.

# Collect hasmtest dump explicitly as $HA in FFDC Header doesnt collect it.
echo "/fabos/sbin/hasmtest dump"
/fabos/sbin/hasmtest dump

if /sbin/chkconfig swdd; then
	/sbin/hainfo RebootReason "Auto reboot recovery"
	sync; sync
	sleep 10
	/usr/bin/reboot
fi
