summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-03-01 12:05:07 +0100
committerErich Eckner <git@eckner.net>2017-03-01 12:05:07 +0100
commit2eda9af169c948e8c1eca88c1f1743c924fe22da (patch)
tree7a47f9e9ce981ac7d1b438744a49b9b8082bde04
parentc2e9a88d028424c37dfc8b9a92869b03672ba8c8 (diff)
downloadupdate-ddns-2eda9af169c948e8c1eca88c1f1743c924fe22da.tar.xz
clean up ip-command
-rw-r--r--update-ddns.in5
1 files changed, 2 insertions, 3 deletions
diff --git a/update-ddns.in b/update-ddns.in
index 063350d..a6dea00 100644
--- a/update-ddns.in
+++ b/update-ddns.in
@@ -65,9 +65,8 @@ do
fi
ips="$(
- "${ipCmd}" "${ipCmdVer}" addr show ${dev} scope global | \
- grep "^\s*${inetVer}\s.*\sscope\sglobal\s" | \
- awk '{print $2}' | \
+ "${ipCmd}" -o "${ipCmdVer}" addr show ${dev} scope global | \
+ awk '{print $4}' | \
cut -d/ -f1 | \
sort -u
)"