summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/IFCFG.pm5
1 files changed, 2 insertions, 3 deletions
diff --git a/common/IFCFG.pm b/common/IFCFG.pm
index 09fc49ef..a8953487 100644
--- a/common/IFCFG.pm
+++ b/common/IFCFG.pm
@@ -26,6 +26,7 @@ use lib qw(/usr/lib/libDrakX);
use MDK::Common;
use network::network;
use detect_devices;
+require Net::Route::Table;
#my $file = "/etc/sysconfig/network-scripts/drakconnect_conf";
#!-f $file and die "no such $file";
@@ -95,9 +96,7 @@ sub is_dhcp {
}
sub default_itf {
- local $_ = `/sbin/route | grep default | tr -s " " | cut -d " " -f8`;
- s/\n$//;
- $_;
+ return eval { Net::Route::Table->from_system->default_route->interface };
}
sub itf_get {