From babbf17fe47748a56a2bb64285f02776ceaff35b Mon Sep 17 00:00:00 2001 From: Antoine Ginies Date: Tue, 27 Jan 2004 15:13:53 +0000 Subject: few correction/debug (nonotor report) --- ftp_wizard/Proftpd.pm | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'ftp_wizard') 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 -- cgit v1.2.1