summaryrefslogtreecommitdiffstats
path: root/ftp_wizard
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-10-17 16:54:42 +0000
committerThierry Vignaud <tv@mageia.org>2012-10-17 16:54:42 +0000
commit4dc2d14b2c2a97976c1beace3ad2b3f309c1e220 (patch)
treea69b0741d53b792b032bb0b48bb5e2ed05e7e78a /ftp_wizard
parent315d0396fac6446740ac932700c991546e6e1fb6 (diff)
downloaddrakwizard-4dc2d14b2c2a97976c1beace3ad2b3f309c1e220.tar
drakwizard-4dc2d14b2c2a97976c1beace3ad2b3f309c1e220.tar.gz
drakwizard-4dc2d14b2c2a97976c1beace3ad2b3f309c1e220.tar.bz2
drakwizard-4dc2d14b2c2a97976c1beace3ad2b3f309c1e220.tar.xz
drakwizard-4dc2d14b2c2a97976c1beace3ad2b3f309c1e220.zip
perl_checker cleanups
Diffstat (limited to 'ftp_wizard')
-rwxr-xr-xftp_wizard/Proftpd.pm23
1 files changed, 15 insertions, 8 deletions
diff --git a/ftp_wizard/Proftpd.pm b/ftp_wizard/Proftpd.pm
index 5a93d069..ad642b63 100755
--- a/ftp_wizard/Proftpd.pm
+++ b/ftp_wizard/Proftpd.pm
@@ -102,7 +102,7 @@ $o->{pages} = {
$o->{var}{wiz_server_name} = $servername;
},
data => [
- { label => N('Server name:'), val => \$o->{var}{wiz_server_name} },
+ { label => N("Server name:"), val => \$o->{var}{wiz_server_name} },
{ label => N("Admin email:"), val => \$o->{var}{wiz_server_admin}, help => 'admin@guibland.com' },
{ label => N("Permit root login:"), type => 'bool', val => \$o->{var}{wiz_root_login} },
],
@@ -111,12 +111,15 @@ $o->{pages} = {
$in->ask_warn(N("Error"), N("I can't find bash in list of shells! It seems you have modified it by hand! Please correct."));
return 1;
}
- if (!$o->{var}{wiz_server_name}) { $in->ask_warn(N("Error"), N("Need a server name")); return 1; }
+ if (!$o->{var}{wiz_server_name}) {
+ $in->ask_warn(N("Error"), N("Need a server name"));
+ return 1;
+ }
},
next => 'options_step2',
},
options_step2 => {
- name => N('FTP server options, step 2') . "\n\n" . N("Chroot home user: users will only see their home directory.") . "\n" . N("Allow FTP resume: allow resume upload or download on FTP server.") . "\n" . N("Allow FXP: allow file transfer via another FTP."),
+ name => N("FTP server options, step 2") . "\n\n" . N("Chroot home user: users will only see their home directory.") . "\n" . N("Allow FTP resume: allow resume upload or download on FTP server.") . "\n" . N("Allow FXP: allow file transfer via another FTP."),
pre => sub {
$o->{var}{wiz_default_root} ||= 1;
$o->{var}{wiz_ftp_resume} ||= 1;
@@ -124,12 +127,16 @@ $o->{pages} = {
$o->{var}{wiz_port} = -e $ftp_port ? $ftp_port : "21";
},
data => [
- { label => N('FTP Port:'), val => \$o->{var}{wiz_port}, help => 'Default port is 21 for an FTP server' },
+ { label => N("FTP Port:"), val => \$o->{var}{wiz_port}, help => 'Default port is 21 for an FTP server' },
{ label => N("Chroot home user:"), type => 'bool', val => \$o->{var}{wiz_default_root} },
{ label => N("Allow FTP resume:"), type => 'bool', val => \$o->{var}{wiz_ftp_resume} },
{ label => N("Allow FXP:"), type => 'bool', val => \$o->{var}{wiz_ftp_fxp} },
],
- complete => sub { if ($o->{var}{wiz_port} !~ /^\d+$/) { $in->ask_warn(N('Error'), N('FTP Port should be a number.')); return 1; } },
+ complete => sub {
+ if ($o->{var}{wiz_port} !~ /^\d+$/) {
+ $in->ask_warn(N("Error"), N("FTP Port should be a number."));
+ return 1;
+ } },
next => 'summary',
},
warning_dhcp => {
@@ -153,7 +160,7 @@ $o->{pages} = {
$o->{var}{fxp} = $o->{var}{wiz_ftp_fxp} ? N("enabled") : N("disabled");
},
data => [
- { label => N('FTP Port:'), val_ref => \$o->{var}{wiz_port} },
+ { label => N("FTP Port:"), val_ref => \$o->{var}{wiz_port} },
{ label => N("Intranet FTP server:"), val_ref => \$o->{var}{internal} },
{ label => N("Internet FTP server:"), val_ref => \$o->{var}{external} },
{ label => N("Permit root Login"), val_ref => \$o->{var}{rootlogin} },
@@ -212,7 +219,7 @@ sub print_anonymous {
my ($arg) = @_;
print '
#<drakwizard>
-<Anonymous '.$arg.'>
+<Anonymous ' . $arg . '>
User ftp
Group ftp
UserAlias anonymous ftp
@@ -254,7 +261,7 @@ sub do_it {
MDK::Common::cp_af($file, $file . ".orig");
my $allow;
if ($wiz_ftp_internal && !$wiz_ftp_external) {
- ($allow) = $wiz->{net}->itf_get("IPADDR") =~ qr/^(\d{1,3}\.\d{1,3}\.\d{1,3}\.)\d{1,3}$/;
+ ($allow) = $wiz->{net}->itf_get("IPADDR") =~ /^(\d{1,3}\.\d{1,3}\.\d{1,3}\.)\d{1,3}$/;
$allow .= " 127.0.0.1";
}
elsif ($wiz_ftp_external) {