mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2026-03-08 02:07:28 +01:00
netmode: add log message for netmode_get_ip_type function
This commit is contained in:
parent
6e0521962e
commit
072c2dc4ab
1 changed files with 7 additions and 1 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue