summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-02-17 17:35:48 +0000
committerOlivier Blin <oblin@mandriva.org>2005-02-17 17:35:48 +0000
commit4db98db63327456fbd64b0302eaacff7dd6820aa (patch)
tree51af07c71dad60563dcb1d587c58aa442005eadf /perl-install/network
parenta01b657909bf20848f15d08cf0dda3929fda8815 (diff)
downloaddrakx-4db98db63327456fbd64b0302eaacff7dd6820aa.tar
drakx-4db98db63327456fbd64b0302eaacff7dd6820aa.tar.gz
drakx-4db98db63327456fbd64b0302eaacff7dd6820aa.tar.bz2
drakx-4db98db63327456fbd64b0302eaacff7dd6820aa.tar.xz
drakx-4db98db63327456fbd64b0302eaacff7dd6820aa.zip
add get_default_device
Diffstat (limited to 'perl-install/network')
-rw-r--r--perl-install/network/shorewall.pm11
1 files changed, 8 insertions, 3 deletions
diff --git a/perl-install/network/shorewall.pm b/perl-install/network/shorewall.pm
index 4b76f230a..2f15dbaa1 100644
--- a/perl-install/network/shorewall.pm
+++ b/perl-install/network/shorewall.pm
@@ -45,17 +45,22 @@ sub get_config_file {
map { [ split ' ' ] } grep { !/^#/ } cat_("$::prefix/etc/shorewall/$file");
}
-sub get_net_device() {
+sub get_default_device() {
my $netcnx = {};
my $netc = {};
my $intf = {};
network::netconnect::read_net_conf($netcnx, $netc, $intf);
my $default_intf = network::tools::get_default_gateway_interface($netc, $intf);
- $default_intf->{DEVICE} =~ /^ippp/ && "ippp+" ||
- $default_intf->{DEVICE} =~ /^ppp/ && "ppp+" ||
$default_intf->{DEVICE};
}
+sub get_net_device() {
+ my $default_dev = get_default_device();
+ $default_dev =~ /^ippp/ && "ippp+" ||
+ $default_dev =~ /^ppp/ && "ppp+" ||
+ $default_dev;
+}
+
sub default_interfaces_silent {
my ($_in) = @_;
my %conf;