Vagrant Issue #6608

Refactor and repair regular expression attempting to match present interfaces.
The refactored regular expression will match on enp* ens* eth* variants.
This commit is contained in:
Joshua Harshman 2015-11-27 13:13:44 -08:00
parent b63fdf756f
commit 652b4dac55
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ module VagrantPlugins
# Read network interface names
interfaces = []
comm.sudo("ifconfig | grep 'enp0\\|ens' | cut -f1 -d:") do |_, result|
comm.sudo("ifconfig | grep '(e[n,t][h,s,p][[:digit:]]([a-z][[:digit:]])?' | cut -f1 -d:") do |_, result|
interfaces = result.split("\n")
end