summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
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;