Merge pull request 'Use `ip` command when Ubuntu 22.04.' (#24) from vector-syslog-modification into main

Reviewed-on: #24
This commit is contained in:
Kazuhiro MUSASHI 2024-04-27 06:00:47 +00:00
commit 14e874f439
2 changed files with 2 additions and 2 deletions

View File

@ -3,7 +3,7 @@
# -------------------------------------------
case run_command('grep VERSION_ID /etc/os-release | awk -F\" \'{print $2}\'').stdout.chomp
when "20.04"
when "20.04", "22.04"
cmd = 'LANG=C ip a | grep "inet " | grep -v -E "(127|172)" | cut -d" " -f6 | perl -pe "s/\/.+//g"'
when "18.04"

View File

@ -2,7 +2,7 @@
# Specifying the default settings:
# -------------------------------------------
case run_command('grep VERSION_ID /etc/os-release | awk -F\" \'{print $2}\'').stdout.chomp
when "20.04"
when "20.04", "22.04"
cmd = 'LANG=C ip a | grep "inet " | grep -v -E "(127|172)" | cut -d" " -f6 | perl -pe "s/\/.+//g"'
when "18.04"