2011-04-04 Dario Rodriguez <dario.rodriguez@artica.es>
* plugins/pandora_update: Fixed a problem getting pandora_agent pid in SunOS. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4167 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
f33f30d9a1
commit
20521c554f
|
@ -1,3 +1,8 @@
|
|||
2011-04-04 Dario Rodriguez <dario.rodriguez@artica.es>
|
||||
|
||||
* plugins/pandora_update: Fixed a problem getting pandora_agent pid
|
||||
in SunOS.
|
||||
|
||||
2011-04-04 Dario Rodriguez <dario.rodriguez@artica.es>
|
||||
|
||||
* pandora_agent_installer: Added correct user to tentacle_client binary.
|
||||
|
|
|
@ -96,13 +96,15 @@ sub get_agent_pid ($$) {
|
|||
|
||||
$cmd ="ps -ex | grep \"$daemon $app_path\" | grep -v grep | head -1 | awk '{ print \$1 }'";
|
||||
}
|
||||
elsif ($os_name eq "SunOS") {
|
||||
elsif ($os_name =~ /SunOS/) {
|
||||
my $cmd_aux="echo \"$daemon $app_path\" | cut -c1-40";
|
||||
my $truncated_daemon = `$cmd_aux`;
|
||||
|
||||
chop($truncated_daemon);
|
||||
|
||||
my $zone = `/bin/zonename`;
|
||||
|
||||
if ( $zone eq "global") {
|
||||
if ( $zone =~ /global/) {
|
||||
$cmd ="ps -f -z global | grep \"$truncated_daemon\" | grep -v grep | head -1 | awk '{ print \$2 }'";
|
||||
} else {
|
||||
$cmd ="ps -Af | grep \"$truncated_daemon\" | grep -v grep | head -1 | awk '{ print \$2 }'";
|
||||
|
|
Loading…
Reference in New Issue