Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

savepnpc with conditions

Status
Not open for further replies.

Iago77

IS-IT--Management
Jun 9, 2003
125
ES
Hello everybody,

I am using savepnpc functionality to launch a script when you start a group.

Within the client you have /nsr/res/GroupName.res:

type: savepnpc;
precmd: "/etc/oracle/script1 \> /tmp/pre.out 2\>&1";
pstcmd: "/etc/oracle/script2; /scripts/findfailed.sh /nsr/tmp/sec/sg/GroupName/*\> /tmp/post.out 2\>&1 && /etc/oracle/script3 \>> /tmp/post.out 2\>&1"; ;
abort precmd with group: No;

The precmd section finishes without any error so Legato start to backup the savesets. The postcmd also executes with no conditions so I've had to do the following:

pstcmd: "/etc/oracle/script2; /scripts/findfailed.sh /nsr/tmp/sec/sg/GroupName/*\> /tmp/post.out 2\>&1 && /etc/oracle/script3 \>> /tmp/post.out 2\>&1";

findfailed.sh looks for a string err in the inner log of Legato to make a condition which can be used to launch or not script3. I am not interested in launching script3 because it deletes files, so if backup is not ok. (This necessary cause of Oracle DBA).

It works out really good on the Legato server, but if you try it in a client it doesn't. Client hasn't a /nsr/tmp/sec/g/GroupName...

Is there any way to test the result of a backup group in the client?

Could you give some piece of advice to solve it?

Manu thanks in advance,

Iago
 
Hi,

you could use nsradmin from the client to get the result of the savegroup. What you are after is the hidden completion field on the group resource. There are all the messages produced from the savegroup so far.

Good luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top