diff options
author | Olivier Blin <oblin@mandriva.org> | 2004-08-25 05:35:48 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2004-08-25 05:35:48 +0000 |
commit | fbcd0969b3316b1c52aa72c9ebade8fbb3ec7c5c (patch) | |
tree | 3039e4d65af376d114f7def3b1ef1f653c040738 /perl-install/network/tools.pm | |
parent | 4f3dac86d5055ae5e3ce8bee2875b7de800f8880 (diff) | |
download | drakx-fbcd0969b3316b1c52aa72c9ebade8fbb3ec7c5c.tar drakx-fbcd0969b3316b1c52aa72c9ebade8fbb3ec7c5c.tar.gz drakx-fbcd0969b3316b1c52aa72c9ebade8fbb3ec7c5c.tar.bz2 drakx-fbcd0969b3316b1c52aa72c9ebade8fbb3ec7c5c.tar.xz drakx-fbcd0969b3316b1c52aa72c9ebade8fbb3ec7c5c.zip |
add get_interface_type to guess interface type
Diffstat (limited to 'perl-install/network/tools.pm')
-rw-r--r-- | perl-install/network/tools.pm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm index 506086043..50165f871 100644 --- a/perl-install/network/tools.pm +++ b/perl-install/network/tools.pm @@ -285,4 +285,11 @@ sub test_internet_connection() { } } +sub get_interface_type { + my ($interface) = @_; + $interface->{DEVICE} =~/^(eth|ath|wlan)/ && "ethernet" || + $interface->{DEVICE} =~/^ippp/ && "isdn" || + $interface->{DEVICE} =~ /^ppp/ && (member($interface->{TYPE}, "xDSL", "ADSL") ? "adsl" : "modem"); +} + 1; |