summaryrefslogtreecommitdiffstats
path: root/perl-install/network/tools.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-11-11 22:20:22 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-11-11 22:20:22 +0000
commit22ad938758373ec4e2f8490d62f2cdc237d50d7c (patch)
tree7848808920e41e4bbdee22867646139e7a907099 /perl-install/network/tools.pm
parentbfd84f6e2df1b083c8d95f6f8a84ede73d36dfea (diff)
downloaddrakx-22ad938758373ec4e2f8490d62f2cdc237d50d7c.tar
drakx-22ad938758373ec4e2f8490d62f2cdc237d50d7c.tar.gz
drakx-22ad938758373ec4e2f8490d62f2cdc237d50d7c.tar.bz2
drakx-22ad938758373ec4e2f8490d62f2cdc237d50d7c.tar.xz
drakx-22ad938758373ec4e2f8490d62f2cdc237d50d7c.zip
- replace ... =~ 'foo' with ... =~ /foo/
- remove unneeded parentheses for things like ... if (...)
Diffstat (limited to 'perl-install/network/tools.pm')
-rw-r--r--perl-install/network/tools.pm15
1 files changed, 7 insertions, 8 deletions
diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm
index e1db41702..299016681 100644
--- a/perl-install/network/tools.pm
+++ b/perl-install/network/tools.pm
@@ -14,7 +14,7 @@ use MDK::Common::System qw(getVarsFromSh);
sub write_cnx_script {
my ($netc, $type, $up, $down, $type2) = @_;
if ($type) {
- $netc->{internet_cnx}{$type}{$_->[0]}=$_->[1] foreach ([$connect_file, $up], [$disconnect_file, $down]);
+ $netc->{internet_cnx}{$type}{$_->[0]}=$_->[1] foreach [$connect_file, $up], [$disconnect_file, $down];
$netc->{internet_cnx}{$type}{type} = $type2;
} else {
foreach ($connect_file, $disconnect_file) {
@@ -128,13 +128,12 @@ sub detect_timezone {
sub type2interface {
my ($i) = @_;
- $i=~/$_->[0]/ and return $_->[1] foreach (
- [ modem => 'ppp'],
- [ isdn_internal => 'ippp'],
- [ isdn_external => 'ppp'],
- [ adsl => 'ppp'],
- [ cable => 'eth'],
- [ lan => 'eth']);
+ $i=~/$_->[0]/ and return $_->[1] foreach [ modem => 'ppp'],
+ [ isdn_internal => 'ippp'],
+ [ isdn_external => 'ppp'],
+ [ adsl => 'ppp'],
+ [ cable => 'eth'],
+ [ lan => 'eth'];
}
sub connected { gethostbyname("mandrakesoft.com") ? 1 : 0 }