mirror of
https://github.com/openwrt/packages.git
synced 2025-12-18 16:41:22 +00:00
With DSL connection ifconfig hasn't broadcast address but P-t-P so awk don't match nothing
This commit is contained in:
@@ -589,7 +589,7 @@ get_local_ip () {
|
||||
interface )
|
||||
if [ $use_ipv6 -eq 0 ]; then
|
||||
__IP=$(ifconfig $ip_interface | awk '
|
||||
/Bcast.*Mask/ { # Filter IPv4
|
||||
/inet addr:/ { # Filter IPv4
|
||||
# inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
|
||||
$1=""; # remove inet
|
||||
$3=""; # remove Bcast: ...
|
||||
|
||||
Reference in New Issue
Block a user