From ccf9e0bd81af00cf55b663a518f82a866d9b64a9 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 5 Nov 2003 13:35:18 +0000 Subject: detect all up||down interfaces w/o any hardcoded limits: - rollback to old active poll on existing interfaces rather than relying on kernel interfaces list (since it does not list unconfigured interfaces) - get the network interfaces list from /proc/net/dev (reusing the same logic as from "ifconfig -a") --- perl-install/detect_devices.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'perl-install') diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index 455269ba4..11115cc35 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -417,7 +417,12 @@ sub getSagem() { } sub getNet() { - grep { /^(eth|fddi|plip|tr|wifi|wlan)/ } c::getNetInterfaces(); + grep { !(($::isStandalone || $::live) && /plip/) && c::hasNetDevice($_) } + grep { /^(eth|fddi|plip|tr|wifi|wlan)/ } + map_index { + # skip headers + if_(1 < $::i && /^\s*([a-z]*[0-9]*):/, $1) + } cat_("/proc/net/dev"); } #sub getISDN() { -- cgit v1.2.1