diff --git a/pandora_agents/unix/ChangeLog b/pandora_agents/unix/ChangeLog index 4bc33c4ddc..9d525d3b4e 100644 --- a/pandora_agents/unix/ChangeLog +++ b/pandora_agents/unix/ChangeLog @@ -1,3 +1,8 @@ +2013-07-10 Ramon Novoa + + * pandora_agent: Changed the regexp used to retrieve ip addresses to + avoid locale related problems. + 2013-07-03 Ramon Novoa * pandora_agent.redhat.spec: Make absolute calls to chkconfig. Add the diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index d7b8598d04..72c5d6b4a9 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -2086,7 +2086,7 @@ while (1) { # Check if address is auto to get the local ip if ($Conf{'address'} eq 'auto') { # Tested on Ubuntu, debian, Suse, Solaris 10 and AIX 5.1 - my @address_list = `ifconfig -a | grep -v '127.0.0' | grep '[0-9]*\\.[0-9]*\\.[0-9]*' | awk '{ print \$2 }' | sed -e 's/addr\\://' | sed -e 's/inet\\://'`; + my @address_list = `ifconfig -a | grep -v '127.0.0' | grep '[0-9]*\\.[0-9]*\\.[0-9]*' | awk '{ print \$2 }' | awk -F':' '{ print \$2 }'`; for (my $i = 0; $i <= $#address_list; $i++) { chomp($address_list[$i]); if ($i > 0) {