2013-07-10 Ramon Novoa <rnovoa@artica.es>
* pandora_agent: Changed the regexp used to retrieve ip addresses to avoid locale related problems. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8507 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
51502c2276
commit
f2b7f898fd
|
@ -1,3 +1,8 @@
|
|||
2013-07-10 Ramon Novoa <rnovoa@artica.es>
|
||||
|
||||
* pandora_agent: Changed the regexp used to retrieve ip addresses to
|
||||
avoid locale related problems.
|
||||
|
||||
2013-07-03 Ramon Novoa <rnovoa@artica.es>
|
||||
|
||||
* pandora_agent.redhat.spec: Make absolute calls to chkconfig. Add the
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue