From e8f8d17670152cfa685f43af8882cf5bae7f7cfd Mon Sep 17 00:00:00 2001 From: Pellaeon Lin Date: Sat, 7 Dec 2013 11:20:48 +0800 Subject: [PATCH] Allow dot in interface name --- functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions b/functions index 5ff4a9b7ca..de1f7a7b71 100644 --- a/functions +++ b/functions @@ -218,7 +218,7 @@ function get_default_host_ip() { local host_ip=$4 # Find the interface used for the default route - host_ip_iface=${host_ip_iface:-$(ip route | sed -n '/^default/{ s/.*dev \(\w\+\)\s\+.*/\1/; p; }' | head -1)} + host_ip_iface=${host_ip_iface:-$(ip route | sed -n '/^default/{ s/.*dev \([a-z.0-9_]\+\)\s\+.*/\1/; p; }' | head -1)} # Search for an IP unless an explicit is set by ``HOST_IP`` environment variable if [ -z "$host_ip" -o "$host_ip" == "dhcp" ]; then host_ip=""