summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2004-08-11 14:51:43 +0000
committerOlivier Blin <oblin@mandriva.org>2004-08-11 14:51:43 +0000
commit8d62898c2bbb8d9039430f689a1387e2e201be0d (patch)
tree798733407b79030dd6fa348f7b902db6f0cc1097 /perl-install
parente560f277e840a949e7c9535bb293b658e5a92d95 (diff)
downloaddrakx-backup-do-not-use-8d62898c2bbb8d9039430f689a1387e2e201be0d.tar
drakx-backup-do-not-use-8d62898c2bbb8d9039430f689a1387e2e201be0d.tar.gz
drakx-backup-do-not-use-8d62898c2bbb8d9039430f689a1387e2e201be0d.tar.bz2
drakx-backup-do-not-use-8d62898c2bbb8d9039430f689a1387e2e201be0d.tar.xz
drakx-backup-do-not-use-8d62898c2bbb8d9039430f689a1387e2e201be0d.zip
use each_index
Diffstat (limited to 'perl-install')
-rwxr-xr-xperl-install/standalone/drakroam8
1 files changed, 3 insertions, 5 deletions
diff --git a/perl-install/standalone/drakroam b/perl-install/standalone/drakroam
index eab863caf..00a66425f 100755
--- a/perl-install/standalone/drakroam
+++ b/perl-install/standalone/drakroam
@@ -57,9 +57,7 @@ my %available_roaming_daemons = (
},
read_config => sub {
my ($config) = @_;
- my $line = 0;
- foreach (cat_($config)) {
- $line++;
+ each_index {
if (/^#/) {} #ignore comments
elsif (/^\n/) {} #ignore blank lines
elsif (/([^ \t]+)([ \t]+)(.*)/) {
@@ -80,8 +78,8 @@ my %available_roaming_daemons = (
else { $dhcp = 0 }
&AddNet($essid, $mode, $channel, $key, $dhcp);
}
- else { die "Line $line of configuration file is not parseable.\n" }
- }
+ else { die "Line $::i of configuration file is not parseable.\n" }
+ } cat_($config)
},
write_config => sub {
my ($config) = @_;