#!/bin/ksh echo "Are You sure??" read a echo "..." lsdev -Cc disk 2> /dev/null | grep N/A > /dev/null if [[ $? = 0 ]] then echo "Removing NA disks...." for i in `lsdev -Cc disk 2> /dev/null | grep N/A | awk '{print $1}'` do echo "Removing $i" echo odmdelete -q name=${i} -o CuAt odmdelete -q name=${i} -o CuAt echo odmdelete -q name=${i} -o CuDv odmdelete -q name=${i} -o CuDv echo odmdelete -q value3=${i} -o CuDvDr odmdelete -q value3=${i} -o CuDvDr echo rm /dev/${i} /dev/r${i} rm /dev/${i} /dev/r${i} done echo /usr/sbin/savebase /usr/sbin/savebase echo /usr/sbin/bosboot -ad /dev/ipldevice /usr/sbin/bosboot -ad /dev/ipldevice else echo "No N/A disks found" fi echo "... Done!" echo "A reboot is suggested"