01-29-2014 01:48 AM
I am facing a problem where i want to create a file in the AUTOACTION part of the policy data file.
when I am using a bash command "touch test.txt", the file is getting created successfully as a auto action part, but when i am using a perl script to do the same thing thing, its getting failed. I have exported the perl path and successfully in /etc/profile and ~/.bash_profile file. The perl script is running on command line with no problem.
Is there any dependeny of perl in HPOM. How can I debug the auto action part.
Please help me in dubugging this issue..
Thank You All
Solved! Go to Solution.
01-29-2014 02:04 AM
How does your auto action command look like? What's the first line in the script itself?
How to debug it depends on system where this runs on.
01-29-2014 02:17 AM
Thank You for your response and time.
I have a script named test.pl in path /usr/local/test
What I have done is exported the path /usr/local/test in my /etc/profile and ~/.bash_profile file and source it. After that I am using just test .pl command to execute the test.pl file. It has execution (777) permission. This file is running successfully from bash shell command line, But when I am putting the same test.pl command as a AUTORUN command in policy data file, it is getting failed.
This is the test file content.
my $file = "temp.txt";
open (FILE, '>'.$file );
print FILE "Hello theren";
print FILE "How are you?n";
I am using RHEL 5.5
01-29-2014 04:00 AM
Yes you are right. I have already tested like you mentioned to use it as /usr/local/test/test.pl.
But is there any way to that I can export this this "/usr/local/test/" and then run only test.pl as a command like we are doing in bash shell. There should be some envoirnment variavle in HPOM too which we can set and use only test.pl as a command.
01-29-2014 04:09 AM
If you set it in shell and restart 'ovcd', it shall work. But keep in mind this won't work when processes get started at boot using an init script - check "/etc/init.d/OVCtrl" for that.
01-29-2014 04:49 AM - edited 01-30-2014 09:38 PM
Editing "/etc/init.d/OVCtrl" and restarting works.
How can I restart "ovcd". I searched in forum but didn't get it. Can you please give me the command.
Thank You for all your help and suggestions.