summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/IFCFG.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/common/IFCFG.pm b/common/IFCFG.pm
index a9a13037..ca9cb71e 100644
--- a/common/IFCFG.pm
+++ b/common/IFCFG.pm
@@ -64,7 +64,9 @@ sub is_dhcp {
#- TODO : return the main interface
sub default_itf {
- "eth0";
+ $_ = `/sbin/route | grep default | tr -s " " | cut -d " " -f8`;
+ s/\n$//;
+ "$_";
}
sub itf_get {