summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-11-17 15:42:41 +0000
committerOlivier Blin <oblin@mandriva.com>2008-11-17 15:42:41 +0000
commit03aa639ead519a79036050f595ecee21c9b2cba4 (patch)
tree97ab7cbac944fbfbee769242308849a307029ef9 /bin
parent37e707a44ec8b621b12eddf4755a78a20f01fb7a (diff)
downloaddrakx-net-03aa639ead519a79036050f595ecee21c9b2cba4.tar
drakx-net-03aa639ead519a79036050f595ecee21c9b2cba4.tar.gz
drakx-net-03aa639ead519a79036050f595ecee21c9b2cba4.tar.bz2
drakx-net-03aa639ead519a79036050f595ecee21c9b2cba4.tar.xz
drakx-net-03aa639ead519a79036050f595ecee21c9b2cba4.zip
extract get_interface_type
Diffstat (limited to 'bin')
-rwxr-xr-xbin/net_applet9
1 files changed, 7 insertions, 2 deletions
diff --git a/bin/net_applet b/bin/net_applet
index 0890113..6cd4ef2 100755
--- a/bin/net_applet
+++ b/bin/net_applet
@@ -103,11 +103,16 @@ Run the \"%s\" assistant from the Mandriva Linux Control Center", N("Set up a ne
);
}
-sub get_interface_name {
+sub get_interface_type {
my ($interface) = @_;
my $ifcfg = $net->{ifcfg}{$interface};
require network::connection;
- my $type = $ifcfg && network::connection->find_ifcfg_type($ifcfg);
+ $ifcfg && network::connection->find_ifcfg_type($ifcfg);
+}
+
+sub get_interface_name {
+ my ($interface) = @_;
+ my $type = get_interface_type($interface);
my $type_name = $type && $type->get_type_name;
$type_name ? "$type_name ($interface)" : $interface;
}