forked from extern/shorewall_code
Strip leading white space from addresses returned by 'find_first_interface_address[_if_any]'
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@4172 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
f1d415be13
commit
90c58b6812
@ -1114,7 +1114,7 @@ find_first_interface_address() # $1 = interface
|
||||
# Strip off the trailing VLSM mask (or the peer IP in case of a P-t-P link)
|
||||
# along with everything else on the line
|
||||
#
|
||||
echo $addr | sed 's/inet //;s/\/.*//;s/ peer.*//'
|
||||
echo $addr | sed 's/\s*inet //;s/\/.*//;s/ peer.*//'
|
||||
}
|
||||
|
||||
find_first_interface_address_if_any() # $1 = interface
|
||||
@ -1127,7 +1127,7 @@ find_first_interface_address_if_any() # $1 = interface
|
||||
# Strip off the trailing VLSM mask (or the peer IP in case of a P-t-P link)
|
||||
# along with everything else on the line
|
||||
#
|
||||
[ -n "$addr" ] && echo $addr | sed 's/inet //;s/\/.*//;s/ peer.*//' || echo 0.0.0.0
|
||||
[ -n "$addr" ] && echo $addr | sed 's/\s*inet //;s/\/.*//;s/ peer.*//' || echo 0.0.0.0
|
||||
}
|
||||
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user