cosmetic
This commit is contained in:
parent
445bbe90ff
commit
ac46456273
10
ulib/debian
10
ulib/debian
|
@ -318,24 +318,24 @@ function __network_set_mainip() {
|
||||||
# des adresses actuelles, principale et supplémentaire
|
# des adresses actuelles, principale et supplémentaire
|
||||||
eval "$(ip addr show dev "$1" | awk "BEGIN {
|
eval "$(ip addr show dev "$1" | awk "BEGIN {
|
||||||
mainipvar = \"${2:-mainip}\"
|
mainipvar = \"${2:-mainip}\"
|
||||||
netmaskvar = \"${3:-netmask}\"
|
suffixvar = \"${3:-suffix}\"
|
||||||
broadcastvar = \"${4:-broadcast}\"
|
broadcastvar = \"${4:-broadcast}\"
|
||||||
"'
|
"'
|
||||||
print mainipvar "="
|
print mainipvar "="
|
||||||
print netmaskvar "="
|
print suffixvar "="
|
||||||
print broadcastvar "="
|
print broadcastvar "="
|
||||||
}
|
}
|
||||||
$1 == "inet" {
|
$1 == "inet" {
|
||||||
mainip = ""; netmask = ""; broadcast = ""
|
mainip = ""; suffix = ""; broadcast = ""
|
||||||
if (match($0, "inet ([^ ]*)/([^ ]*) ", vs) != 0) {
|
if (match($0, "inet ([^ ]*)/([^ ]*) ", vs) != 0) {
|
||||||
mainip = vs[1]
|
mainip = vs[1]
|
||||||
netmask = vs[2]
|
suffix = vs[2]
|
||||||
}
|
}
|
||||||
if (match($0, "brd ([^ ]*) ", vs) != 0) {
|
if (match($0, "brd ([^ ]*) ", vs) != 0) {
|
||||||
broadcast = vs[1]
|
broadcast = vs[1]
|
||||||
}
|
}
|
||||||
print mainipvar "=\"" mainip "\""
|
print mainipvar "=\"" mainip "\""
|
||||||
print netmaskvar "=\"" netmask "\""
|
print suffixvar "=\"" suffix "\""
|
||||||
print broadcastvar "=\"" broadcast "\""
|
print broadcastvar "=\"" broadcast "\""
|
||||||
exit 0
|
exit 0
|
||||||
}')"
|
}')"
|
||||||
|
|
Loading…
Reference in New Issue