Commit 72be370bb65937edb4ee474cf6f9aef0cfb60bba
1 parent
57333a1d
some smaller fixes regarding spaces between classes and remove of debug output
Showing
1 changed file
with
3 additions
and
5 deletions
@@ -67,8 +67,6 @@ gather_if_info_ip() { | @@ -67,8 +67,6 @@ gather_if_info_ip() { | ||
67 | print "IF_NUMBERS=\"" if_numbers "\";"; | 67 | print "IF_NUMBERS=\"" if_numbers "\";"; |
68 | }') | 68 | }') |
69 | 69 | ||
70 | - echo "DEBUG: ${IF_NO}" | ||
71 | - | ||
72 | eval $(${IP} -o addr | ${AWK} -v if_numbers="${IF_NUMBERS}" '{ | 70 | eval $(${IP} -o addr | ${AWK} -v if_numbers="${IF_NUMBERS}" '{ |
73 | sub(/:/,"",$1); | 71 | sub(/:/,"",$1); |
74 | if_no=$1; | 72 | if_no=$1; |
@@ -77,12 +75,12 @@ gather_if_info_ip() { | @@ -77,12 +75,12 @@ gather_if_info_ip() { | ||
77 | split($4,addr,/[\/]/); | 75 | split($4,addr,/[\/]/); |
78 | print "IF" no "_IPV4=\"${IF" no "_IPV4}" addr[1] " \";"; | 76 | print "IF" no "_IPV4=\"${IF" no "_IPV4}" addr[1] " \";"; |
79 | network(no, addr[1], addr[2]); | 77 | network(no, addr[1], addr[2]); |
80 | - classes=classes $4 " " | 78 | + classes=classes addr[1] " " |
81 | } | 79 | } |
82 | if ($3 == "inet6") { | 80 | if ($3 == "inet6") { |
83 | split($4,addr,/[\/]/); | 81 | split($4,addr,/[\/]/); |
84 | print "IF" no "_IPV6=\"${IF" no "_IPV6}" addr[1] " \";"; | 82 | print "IF" no "_IPV6=\"${IF" no "_IPV6}" addr[1] " \";"; |
85 | - classes=classes $4 " " | 83 | + classes=classes addr[1] " " |
86 | } | 84 | } |
87 | } | 85 | } |
88 | BEGIN { | 86 | BEGIN { |
@@ -123,7 +121,7 @@ gather_if_info_ip() { | @@ -123,7 +121,7 @@ gather_if_info_ip() { | ||
123 | net=net "."; | 121 | net=net "."; |
124 | } | 122 | } |
125 | } | 123 | } |
126 | - classes=classes " " net; | 124 | + classes=classes net " "; |
127 | print "IF" no "_NETWORK=\"" net "\"; export " name "_NETWORK;"; | 125 | print "IF" no "_NETWORK=\"" net "\"; export " name "_NETWORK;"; |
128 | print "IF" no "_MASK=\"" mask "\"; export " name "_MASK;"; | 126 | print "IF" no "_MASK=\"" mask "\"; export " name "_MASK;"; |
129 | }') | 127 | }') |
Please
register
or
login
to post a comment