#!/bin/bash
#kill `pgrep -d ' ' OS_install`

for i in `ps -ef | egrep -i '(os_install|lpar_netboot)' | grep $1 | grep -v grep | sed 's/[ ][ ]*/,/g' | cut -d, -f2`
do 
    echo "killing $i";
    kill $i; 
done

sleep 15;

for i in `ps -ef | egrep -i '(os_install|lpar_netboot)' | grep $1 | grep -v grep | sed 's/[ ][ ]*/,/g' | cut -d, -f2`
do 
    echo "killing w/ -9 $i";
    kill -9 $i; 
done

exit 0;
