1850947 Members
2344 Online
104056 Solutions
New Discussion

hpov and script

 
Petrilli
Occasional Advisor

hpov and script

When i try to launch a script with hpov, as an automatic actions, nothing happen! why?
I check the directory of my script and check the permission and set it to 755. My script is a test because i want to know if the script is launch:

#!/bin/sh

/bin/echo "that work" >> /directory/file

And the file never appear, so i think that the script doesnt launch! help please!
15 REPLIES 15
Suresh Patoria
Super Advisor

Re: hpov and script

Hi,

I think u have not set the directory in PATH

U pls set the directory in path useing

$PATH=$PATH:/

or

use the sh
or

you can use the complete path of your script to run

Thanx
john korterman
Honored Contributor

Re: hpov and script

Hi,
I recall that you have to check a few things. One of them is that this command:
# agsysdb -l
must say:
Exec Actions : always
If it does not the scripts attached to actions will not be executed. Enable it this way:
# agsysdb â actions always


regards,
John
it would be nice if you always got a second chance
RolandH
Honored Contributor

Re: hpov and script

Hi Petrilli,

see this OLD thread and I think you will find the solution there.

Be not angry with me, these question was made hundred times. So search first in the forum before you ask a question.

HTH
Roland

http://forums1.itrc.hp.com/service/forums/parseCurl.do?CURL=%2Fcm%2FQuestionAnswer%2F1%2C%2C0x9d17543254bfd611abdb0090277a778c%2C00.html&admit=716493758+1064906173253+28353475
Sometimes you lose and sometimes the others win
john korterman
Honored Contributor

Re: hpov and script

Hi again,
sorry. The command should have been:
# agsysdb -actions always


regards,
John K.
it would be nice if you always got a second chance
Petrilli
Occasional Advisor

Re: hpov and script

thank you, but i have already test to launch my script with: sh /directory/myscript and that doesnt work. :(
I haven't test to add the path in $PATH but as i try to launch it with sh and the directory, i have think (<--preterit ?) that it will not work. I will test now just for see if it work.
Mark Grant
Honored Contributor

Re: hpov and script

Hi,

There isn't an "echo" command in /bin. It's either a shell internal or "/usr/bin/echo".

Hope that helps.
Never preceed any demonstration with anything more predictive than "watch this"
john korterman
Honored Contributor

Re: hpov and script

Hi,
try launching your script like this:
# sh -x /directory/myscript
what output do you get?

regards,
John K.
it would be nice if you always got a second chance
Petrilli
Occasional Advisor

Re: hpov and script

So i have check this point :
-there is a file name ALLOW_ALL in my $OV_CONF/trustedCmds.conf directory, i try xnevents -event and ovstop ovactiond then ovstart ovactiond and that doesnt work.

now i try to see if script launch when i put it in a system directory that is in the $PATH
Petrilli
Occasional Advisor

Re: hpov and script

hi john,

i haven't the command : agsysdb -actions always

;(
Petrilli
Occasional Advisor

Re: hpov and script

when the script is in a system directory that doesn't work too :(
RolandH
Honored Contributor

Re: hpov and script

Look what the logfile from ovactiond said.

It is in $OV_LOG/ovactiond.log

Can you attach this file here!!

Roland
Sometimes you lose and sometimes the others win
Petrilli
Occasional Advisor

Re: hpov and script

i look into the ovactiond.log and there isn't write anywhere that my script is launch, hpov only launch the command that i have wrote directly in the automatique action like the command ping, but not the script.
Petrilli
Occasional Advisor

Re: hpov and script

when i launch sh -x myscript, this return that: + bin/echo "ca marche"
and the file is created (that work)
Petrilli
Occasional Advisor

Re: hpov and script

after a better look on the log file i see that the script cant create the file, so a change permission of 775 to 777. I wait ...
Petrilli
Occasional Advisor

Re: hpov and script

that works! thx everybody :))