Operating System - HP-UX
1830057 Members
2270 Online
109998 Solutions
New Discussion

moitor remap of system - when complete

 
Ross Hansen
Occasional Advisor

moitor remap of system - when complete

I need to initiate a manual remap of the system. This is in an automated script. The commands following the remap need to wait until the remap is done. Any ideas how to accomplish this?

I am using the command:

echo 'rs' | cstm

to initiate the remap

Thanks
1 REPLY 1
Brian Markus
Valued Contributor

Re: moitor remap of system - when complete

Check the status of the command, once it's complete, then run the next piece. Here is an example where I check to see if the program is running or stopped. if it's running $? would be 1 or higher.

ps -ef | grep $program_name | grep -v grep | grep -v $$
if [ $? = 0 ]
then
echo "***** --->> $program_name already running !!!"
exit
fi


Or you could use sleep.


Hope this helps.

-Brian.
When a sys-admin say's maybe, they don't mean 'yes'!