From 072c2dc4abe2a4358620e351f3d6b3fb8731aa94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionu=C8=9B-Alex=20Oprea?= Date: Wed, 25 Apr 2018 16:11:44 +0200 Subject: [PATCH] netmode: add log message for netmode_get_ip_type function --- inteno-netmodes/files/lib/functions/netmode.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/inteno-netmodes/files/lib/functions/netmode.sh b/inteno-netmodes/files/lib/functions/netmode.sh index 0c6d5b4f6..0de0e4d79 100644 --- a/inteno-netmodes/files/lib/functions/netmode.sh +++ b/inteno-netmodes/files/lib/functions/netmode.sh @@ -223,7 +223,13 @@ wait_for_netmode_handler() { } netmode_get_ip_type() { - [ -n "$(echo $1 | grep -E '^(192\.168|10\.|172\.1[6789]\.|172\.2[0-9]\.|172\.3[01]\.)')" ] && echo "private" || echo "public" + [ -n "$(echo $1 | grep -E '^(192\.168|10\.|172\.1[6789]\.|172\.2[0-9]\.|172\.3[01]\.)')" ] && { + logger -t "[netmode]" "netmode_get_ip_type: ip $1 is private" + echo "private" + } || { + logger -t "[netmode]" "netmode_get_ip_type: ip $1 is public" + echo "public" + } } get_device_of() {