summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaud Desmons <adesmons@mandriva.com>2002-12-20 17:40:20 +0000
committerArnaud Desmons <adesmons@mandriva.com>2002-12-20 17:40:20 +0000
commit484543a67e5ceae8489dea6c153c4ab83678df08 (patch)
tree1d579b9986108e120441e47af8c28d9fc97b1369
parent861817ff7d0f8f59fde8a8f217a8a59043f200cd (diff)
downloaddrakwizard-484543a67e5ceae8489dea6c153c4ab83678df08.tar
drakwizard-484543a67e5ceae8489dea6c153c4ab83678df08.tar.gz
drakwizard-484543a67e5ceae8489dea6c153c4ab83678df08.tar.bz2
drakwizard-484543a67e5ceae8489dea6c153c4ab83678df08.tar.xz
drakwizard-484543a67e5ceae8489dea6c153c4ab83678df08.zip
open before use :-)
-rw-r--r--ftp_wizard/scripts/ProFtpconf.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/ftp_wizard/scripts/ProFtpconf.pm b/ftp_wizard/scripts/ProFtpconf.pm
index 5db3c385..711ecc3c 100644
--- a/ftp_wizard/scripts/ProFtpconf.pm
+++ b/ftp_wizard/scripts/ProFtpconf.pm
@@ -42,6 +42,10 @@ sub check_dir {
}
sub get_dir {
+ my $file = "/etc/proftpd.conf";
+ die "no ftp configuration file found ! warning." if (!-f $file);
+ open(NEW, "< $file") or die "error while opening $file: $!";
+
while (<NEW>) { # we need 3 elements to consider section as known
if (m/^\s*<drakwizard>/s...m/^\s*<\/drakwizard>/s ) {
if (m/^\s*<Anonymous\s*(.*)>/s ) {