summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakroam
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/standalone/drakroam')
-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) = @_;