diff options
author | Arnaud Desmons <adesmons@mandriva.com> | 2002-12-09 17:24:23 +0000 |
---|---|---|
committer | Arnaud Desmons <adesmons@mandriva.com> | 2002-12-09 17:24:23 +0000 |
commit | 8f5aea5c59228ff4e71ba8951313d59fbfd99723 (patch) | |
tree | 2e42ca12d617f961c424ec55e3eb15f16667f6ab /ftp_wizard/scripts/ProFtpconf.pm | |
parent | cef4fffc8767d73ee93b8885a8615cbe5ef1b5d0 (diff) | |
download | drakwizard-8f5aea5c59228ff4e71ba8951313d59fbfd99723.tar drakwizard-8f5aea5c59228ff4e71ba8951313d59fbfd99723.tar.gz drakwizard-8f5aea5c59228ff4e71ba8951313d59fbfd99723.tar.bz2 drakwizard-8f5aea5c59228ff4e71ba8951313d59fbfd99723.tar.xz drakwizard-8f5aea5c59228ff4e71ba8951313d59fbfd99723.zip |
No more use of drakconnect_conf, use of IFCFG.pm instead of DrakconnectConf.pm
Diffstat (limited to 'ftp_wizard/scripts/ProFtpconf.pm')
-rw-r--r-- | ftp_wizard/scripts/ProFtpconf.pm | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/ftp_wizard/scripts/ProFtpconf.pm b/ftp_wizard/scripts/ProFtpconf.pm index 77877742..5db3c385 100644 --- a/ftp_wizard/scripts/ProFtpconf.pm +++ b/ftp_wizard/scripts/ProFtpconf.pm @@ -1,7 +1,25 @@ #!/usr/bin/perl +# Drakwizard + +# Copyright (C) 2002 MandrakeSoft Arnaud Desmons (adesmons@mandrakesoft.com) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + package ProFtpconf; -require "__WIZ_HOME__/common/scripts/DrakconnectConf.pm"; +require "__WIZ_HOME__/common/scripts/IFCFG.pm"; use MDK::Common; use strict; require "__WIZ_HOME__/common/scripts/Vareqval.pm"; @@ -16,6 +34,9 @@ sub true { } sub check_dir { + foreach (keys %ENV) { + print "$_ $ENV{$_}\n"; + } -d ($ENV{wiz_dir}) and return 10; 1; } @@ -28,10 +49,10 @@ sub get_dir { } } } - ""; + return ""; } -my $o = DrakconnectConf->new(); +my $o = IFCFG->new(); sub check { $> and return 1; @@ -39,7 +60,7 @@ sub check { 0; } -sub print_anonymous() { +sub print_anonymous() { print ' #<drakwizard> <Anonymous '.$_[0].'> @@ -64,7 +85,7 @@ sub do_it { open(NEW, "< $file") or die "error while opening $file: $!"; my $allow = "all"; if ($wiz_ftp_internal && !$wiz_ftp_external) { - ($allow) = $o->get_from_known_dev("IP") =~ qr/^(\d{1,3}\.\d{1,3}\.\d{1,3}\.)\d{1,3}$/; + ($allow) = $o->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) { @@ -139,4 +160,3 @@ sub do_it { 10; } 1; - |