2013-04-17 Ramon Novoa <rnovoa@artica.es>
* pandora_agent: Added support for sending multiple ip addresses. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7999 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
094bbfc5df
commit
86eaf4700e
|
@ -1,3 +1,7 @@
|
|||
2013-04-17 Ramon Novoa <rnovoa@artica.es>
|
||||
|
||||
* pandora_agent: Added support for sending multiple ip addresses.
|
||||
|
||||
2013-04-12 Ramon Novoa <rnovoa@artica.es>
|
||||
|
||||
* pandora_agent: Added macro support to all module configuration
|
||||
|
|
|
@ -2030,8 +2030,15 @@ 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
|
||||
$address = `ifconfig -a | grep -v '127.0.0' | grep '[0-9]*\\.[0-9]*\\.[0-9]*' | awk '{ print \$2 }' | head -1 | sed -e 's/addr\\://' | sed -e 's/inet\\://'`;
|
||||
chomp($address);
|
||||
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\\://'`;
|
||||
for (my $i = 0; $i <= $#address_list; $i++) {
|
||||
chomp($address_list[$i]);
|
||||
if ($i > 0) {
|
||||
$address .= ',';
|
||||
}
|
||||
|
||||
$address .= $address_list[$i];
|
||||
}
|
||||
}
|
||||
else {
|
||||
$address = $Conf{'address'};
|
||||
|
|
Loading…
Reference in New Issue