All pastes #146573 Raw Edit

Untitled

public text v1 · immutable
#146573 ·published 2006-08-23 18:23 UTC
rendered paste body
#!/bin/sh

megarcstatus=`/usr/local/sbin/megarc -dispCfg -a0 | grep "Logical Drive :"`

echo ""
echo `hostname` RAID Status:
echo ""
echo $megarcstatus

arraystatus=`echo "$megarcstatus" | awk '{print $9}'`

echo $arraystatus

if [ $arraystatus = "OPTIMAL" ]; then
        echo $arraystatus
fi

Ouput is:

RAID Status:

Logical Drive : 0( Adapter: 0 ): Status: OPTIMAL
OPTIMAL


Output Should be:

RAID Status:

Logical Drive : 0( Adapter: 0 ): Status: OPTIMAL
OPTIMAL
OPTIMAL