From aeae98557a0c80e5650b7d4635e3a6672e0a3928 Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Fri, 22 Sep 2000 17:30:31 +0000 Subject: now includes info from netconnect to ignore interface used for internet connection --- perl-install/standalone/drakgw | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'perl-install/standalone/drakgw') diff --git a/perl-install/standalone/drakgw b/perl-install/standalone/drakgw index 6b4b3305e..4a9b4de08 100755 --- a/perl-install/standalone/drakgw +++ b/perl-install/standalone/drakgw @@ -19,6 +19,7 @@ use common qw(:system :file); use interactive; use log; use c; +use netconnect; use detect_devices; local $_ = join '', @ARGV; @@ -160,14 +161,14 @@ my @configured_devices = map { /ifcfg-(\S+)/; $1 } `ls /etc/sysconfig/network-sc #my @active_devices = `/sbin/ifconfig | grep ^[a-z] | awk '{print \$1}'`; chop @active_devices; -my %aliased_devices; (/^alias\s+(eth[0-9])\s+(\S+)/) and ($aliased_devices{$1} = $2) foreach (`cat /etc/modules.conf`); -my @cards_to_ignore = (); #= @{netconnect::configured_devices}; -log::l("Information from netconnect: ignoring card $_\n") foreach (@cards_to_ignore); +my %aliased_devices; (/^alias\s+(eth[0-9])\s+(\S+)/) and ($aliased_devices{$1} = $2) foreach cat_("/etc/modules.conf"); +my $card_netconnect = netconnect::get_net_device("/"); +(defined $card_netconnect) and log::l("Information from netconnect: ignoring card $card_netconnect\n"); my @all_cards_getnet = detect_devices::getNet(); my @all_cards; foreach my $card (@all_cards_getnet) { - next if grep(/$card/, @cards_to_ignore); + next if ($card eq $card_netconnect); push @all_cards, exists $aliased_devices{$card} ? "Interface $card (using module $aliased_devices{$card})" : "Interface $card"; } -- cgit v1.2.1