Merge branch 'ent-6918-giss-el-agente-unix-no-obtiene-la-ip-del-equipo-en-sistemas-solaris-y-aix' into 'develop'

List IP address pandora_agent (AIX/*Nix)

See merge request artica/pandorafms!3768
This commit is contained in:
Daniel Rodriguez 2021-03-16 12:38:53 +00:00
commit 355af43c0c
1 changed files with 1 additions and 1 deletions

View File

@ -4143,7 +4143,7 @@ while (1) {
@address_list = `ip addr show 2>$DevNull | sed -e '/127.0.0/d' -e '/\\([0-9][0-9]*\\.\\)\\{3\\}[0-9][0-9]*/!d' -e 's/^[ \\t]*\\([^ \\t]*\\)[ \\t]*\\([^ \\t]*\\)[ \\t].*/\\2/' -e 's/\\/.*//'`; @address_list = `ip addr show 2>$DevNull | sed -e '/127.0.0/d' -e '/\\([0-9][0-9]*\\.\\)\\{3\\}[0-9][0-9]*/!d' -e 's/^[ \\t]*\\([^ \\t]*\\)[ \\t]*\\([^ \\t]*\\)[ \\t].*/\\2/' -e 's/\\/.*//'`;
} }
else { else {
@address_list = `ifconfig -a 2>$DevNull | sed -e '/127.0.0/d' -e '/\\([0-9][0-9]*\\.\\)\\{3\\}[0-9][0-9]*/!d' -e 's/^[ \\t]*\\([^ \\t]*\\)[ \\t]*\\([^ \\t]*\\)[ \\t].*/\\2/' -e 's/.*://'`; @address_list = `ifconfig -a 2>$DevNull | grep -i inet | grep -v 'inet6' | grep -v '0.0.0.0' | grep -v '::/0' | awk '{print \$2}' | grep -v '127.0.0.1'`;
} }
for (my $i = 0; $i <= $#address_list; $i++) { for (my $i = 0; $i <= $#address_list; $i++) {