From dd13a9544dc8f0aff92ce87c686716b67f8a9347 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 11 Sep 2024 14:55:08 -0400 Subject: [PATCH] Permit underscores in interface names on FreeBSD This is common when using epair interfaces in VNET jails Signed-off-by: Mark Felder --- lib/ohai/plugins/freebsd/network.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ohai/plugins/freebsd/network.rb b/lib/ohai/plugins/freebsd/network.rb index 9ec9498cd..4c84a9848 100644 --- a/lib/ohai/plugins/freebsd/network.rb +++ b/lib/ohai/plugins/freebsd/network.rb @@ -43,7 +43,7 @@ so = shell_out("#{Ohai.abs_path( "/sbin/ifconfig" )} -a") cint = nil so.stdout.lines do |line| - if line =~ /^([0-9a-zA-Z\.]+):\s+/ + if line =~ /^([0-9a-zA-Z\._]+):\s+/ cint = $1 iface[cint] = Mash.new if cint =~ /^(\w+)(\d+.*)/