make local variables local
.. to not interfere with variables in the scripts that source these utils.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
# https://stackoverflow.com/questions/13777387/check-for-ip-validity
|
||||
function validip () {
|
||||
ip=$1
|
||||
local ip=$1
|
||||
if [ -z $ip ] || ! [[ $ip =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||
return 1
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user