summaryrefslogtreecommitdiffstats
path: root/ftp_wizard
diff options
context:
space:
mode:
authorAntoine Ginies <aginies@mandriva.com>2004-01-27 15:13:53 +0000
committerAntoine Ginies <aginies@mandriva.com>2004-01-27 15:13:53 +0000
commitbabbf17fe47748a56a2bb64285f02776ceaff35b (patch)
tree918c3b25b5b8cb255413228ae7928379f2879670 /ftp_wizard
parentfe729fed41e88c82b1d58e21dc42ecb9dadea131 (diff)
downloaddrakwizard-babbf17fe47748a56a2bb64285f02776ceaff35b.tar
drakwizard-babbf17fe47748a56a2bb64285f02776ceaff35b.tar.gz
drakwizard-babbf17fe47748a56a2bb64285f02776ceaff35b.tar.bz2
drakwizard-babbf17fe47748a56a2bb64285f02776ceaff35b.tar.xz
drakwizard-babbf17fe47748a56a2bb64285f02776ceaff35b.zip
few correction/debug (nonotor report)
Diffstat (limited to 'ftp_wizard')
-rwxr-xr-xftp_wizard/Proftpd.pm15
1 files changed, 6 insertions, 9 deletions
diff --git a/ftp_wizard/Proftpd.pm b/ftp_wizard/Proftpd.pm
index 6c970323..ebc7e266 100755
--- a/ftp_wizard/Proftpd.pm
+++ b/ftp_wizard/Proftpd.pm
@@ -250,21 +250,18 @@ sub do_it {
my $file = "/etc/proftpd.conf";
die "no ftp configuration file found ! warning." if !-f $file;
MDK::Common::cp_af($file, $file . ".orig");
- my $allow = "all";
+ 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 .= " 127.0.0.1";
}
- elsif (!$wiz_ftp_external) {
- $allow = "none";
+ elsif ($wiz_ftp_external) {
+ $allow = "all";
}
my $conf = cat_($file) . "#EndOfFile";
my ($bloc) = $conf =~ /.*?(#drakwizard_pxe_b.*?#drakwizard_pxe_end)\n.*#EndOfFile/s;
- # print "$begin\n";
- # print "$end\n";
-
if (!$bloc) {
$bloc = "
#drakwizard_pxe_b
@@ -279,9 +276,9 @@ sub do_it {
";
append_to_file($file, $bloc);
- } else {
- substInFile { s/Allow from.*/Allow from $allow/ }
- }
+ } else {
+ substInFile { s/Allow from.*/Allow from $allow/ } $file;
+ }
# options
# wiz_root_login wiz_server_admin wiz_default_root wiz_ftp_resume wiz_ftp_fxp