Return all IPv4 and IPv6 addresses.
Signed-off-by: Mathias Kresin open...@kresin.me
---
package/base-files/files/lib/functions/network.sh | 23 +++
1 file changed, 23 insertions(+)
diff --git a/package/base-files/files/lib/functions/network.sh
* Mathias Kresin open...@kresin.me [06.10.2014 20:23]:
+network_get_ipaddrs_all() {
+ local __addr
+ local __list=
1)
is there a special reason for starting everything with '__'?
(the vars are local anyway).
2)
is there a special reason not to name the vars $1 and $2? e.g.
local
Hi Bastian,
the short answer for all your questions is: Because all the existing
functions in network.sh are written this way. The function I would
like to introduce is a dupe of network_get_ipaddrs6() which is a dupe
of network_get_ipaddr6(). All three functions only differ by the value
which is