summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2004-07-13 02:48:48 +0000
committerOlivier Blin <oblin@mandriva.org>2004-07-13 02:48:48 +0000
commit135a5998b2d150ecf1b8da1a4ddff95bf4e256f0 (patch)
tree8baf66654f06b43b7d04da1cfc3ce4fe64a3b027 /perl-install
parent3b8399bc6a5f15b7c51e9af0eef1bec067d596c1 (diff)
downloaddrakx-backup-do-not-use-135a5998b2d150ecf1b8da1a4ddff95bf4e256f0.tar
drakx-backup-do-not-use-135a5998b2d150ecf1b8da1a4ddff95bf4e256f0.tar.gz
drakx-backup-do-not-use-135a5998b2d150ecf1b8da1a4ddff95bf4e256f0.tar.bz2
drakx-backup-do-not-use-135a5998b2d150ecf1b8da1a4ddff95bf4e256f0.tar.xz
drakx-backup-do-not-use-135a5998b2d150ecf1b8da1a4ddff95bf4e256f0.zip
apply Pixel's suggestion, use //m instead of foreach
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";