function get_default_iface_ipv4 : maj doc
This commit is contained in:
parent
72f38baa68
commit
c3ef1f3c7f
|
@ -96,7 +96,7 @@ check_valid_ipv4() {
|
||||||
get_default_iface_ipv4() {
|
get_default_iface_ipv4() {
|
||||||
# Call this function with the name of the variable
|
# Call this function with the name of the variable
|
||||||
# you want to store the result in :
|
# you want to store the result in :
|
||||||
# default_iface_ipv4 myipv4
|
# get_default_iface_ipv4 myipv4
|
||||||
# See https://www.linuxjournal.com/content/return-values-bash-functions
|
# See https://www.linuxjournal.com/content/return-values-bash-functions
|
||||||
local __resultvar=${1}
|
local __resultvar=${1}
|
||||||
local __default_iface=$(awk '$2 == 00000000 { print $1 }' /proc/net/route)
|
local __default_iface=$(awk '$2 == 00000000 { print $1 }' /proc/net/route)
|
||||||
|
|
Loading…
Reference in a new issue