summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/standalone/net_applet4
1 files changed, 1 insertions, 3 deletions
diff --git a/perl-install/standalone/net_applet b/perl-install/standalone/net_applet
index af24320e0..d71dd102d 100644
--- a/perl-install/standalone/net_applet
+++ b/perl-install/standalone/net_applet
@@ -104,9 +104,7 @@ sub checkNetwork() {
if ($h{GATEWAYDEV}) {
$addrgd = getIP($gd = $h{GATEWAYDEV});
} else {
- foreach (`/sbin/ip route show`) {
- ($addrgd, $gd) = /^default\s+via\s+(\S+).*\s+dev\s+(\S+)/ and last;
- }
+ ($addrgd, $gd) = `/sbin/ip route show` =~ /^default\s+via\s+(\S+).*\s+dev\s+(\S+)/m;
}
$gd or die "No Gatewaydev defined";