summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-02-17 17:20:05 +0000
committerOlivier Blin <oblin@mandriva.org>2005-02-17 17:20:05 +0000
commitf7d7214aa239ed16ad8ce0c98e73aa321481568a (patch)
tree91eac848effe302b73938d9cff087966827bc6e6 /perl-install/network
parent8915b898264a9e6c42f4ec5ef9b3e41f6c4f2154 (diff)
downloaddrakx-f7d7214aa239ed16ad8ce0c98e73aa321481568a.tar
drakx-f7d7214aa239ed16ad8ce0c98e73aa321481568a.tar.gz
drakx-f7d7214aa239ed16ad8ce0c98e73aa321481568a.tar.bz2
drakx-f7d7214aa239ed16ad8ce0c98e73aa321481568a.tar.xz
drakx-f7d7214aa239ed16ad8ce0c98e73aa321481568a.zip
add and use network::shorewall::get_net_device
Diffstat (limited to 'perl-install/network')
-rw-r--r--perl-install/network/shorewall.pm13
1 files changed, 12 insertions, 1 deletions
diff --git a/perl-install/network/shorewall.pm b/perl-install/network/shorewall.pm
index 9a313ec3a..6c930d0e4 100644
--- a/perl-install/network/shorewall.pm
+++ b/perl-install/network/shorewall.pm
@@ -45,6 +45,17 @@ sub get_config_file {
map { [ split ' ' ] } grep { !/^#/ } cat_("$::prefix/etc/shorewall/$file");
}
+sub get_net_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 default_interfaces_silent {
my ($_in) = @_;
my %conf;
@@ -52,7 +63,7 @@ sub default_interfaces_silent {
if (@l == 1) {
$conf{net_interface} = $l[0];
} else {
- $conf{net_interface} = network::netconnect::get_net_device() || $l[0];
+ $conf{net_interface} = get_net_device() || $l[0];
$conf{loc_interface} = [ grep { $_ ne $conf{net_interface} } @l ];
}
\%conf;