From aa1779a887489e1c849db74f7e27eb7522fe5101 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Thu, 27 Jun 2019 03:46:03 +0100 Subject: [PATCH] etc/profile.d/functions --- etc/profile.d/functions | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/etc/profile.d/functions b/etc/profile.d/functions index d8978fc2..0e0052fa 100755 --- a/etc/profile.d/functions +++ b/etc/profile.d/functions @@ -932,3 +932,14 @@ cron_d_install() { [ "$cron" != "$(crontab -l)" ] && echo "$cron" | crontab } + +ip_is_local() { + case "$1" in + 10.*) return 0 ;; + 172.16.*) return 0 ;; + 172.2[0-9].*) return 0 ;; + 172.31.*) return 0 ;; + 192.168.*) return 0 ;; + esac + return 1 +} -- 2.47.3