check_dhcp: fix tests interface detection

This commit is contained in:
Sven Nierlein 2013-09-17 13:13:26 +02:00 committed by Sven Nierlein
parent 9090beb058
commit 08d554ada1

View file

@ -36,7 +36,7 @@ my $hostname_invalid = getTestParameter( "NP_HOSTNAME_INVALID",
# try to determince interface
my $interface = '';
if(`ifconfig -a 2>/dev/null` =~ m/^(e(m|th)\d+)/mx and $1 ne 'eth0') {
if(`ifconfig -a 2>/dev/null` =~ m/^(e\w*\d+)/mx and $1 ne 'eth0') {
$interface = ' -i '.$1;
}