From d319bd889c928810a692784ce01d7030472644c1 Mon Sep 17 00:00:00 2001 From: Sebastien Dupont Date: Fri, 7 Dec 2001 01:29:19 +0000 Subject: add ftp client for network backup. --- perl-install/standalone/drakbackup | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'perl-install/standalone') diff --git a/perl-install/standalone/drakbackup b/perl-install/standalone/drakbackup index bcd44e421..75175e908 100755 --- a/perl-install/standalone/drakbackup +++ b/perl-install/standalone/drakbackup @@ -323,6 +323,36 @@ sub return_path { } } +sub ftp_client { + +use Net::FTP; +my $ftp = Net::FTP->new("some.host.name"); +$ftp->login("anonymous","mon\@adresse.mail"); +$ftp->cwd("/pub"); +$ftp->get("/ce/repertoire/ce.fichier"); +$ftp->quit; + +#Telnet : En utilisant le package Net::Telnet + +# use strict; +# use Net::Telnet; +# use CGI qw/:standard :html3 :netscape escape unescape/; +# use CGI::Carp qw/fatalsToBrowser/; +# my $username="alian"; +# my $passwd="password"; +# my $HOST="indy.alianet"; +# print header; +# my $t = new Net::Telnet (Timeout=>undef) or die "Can't connect:$!"; +# $t->open($HOST); +# $t->login($username, $passwd); +# my @lines = $t->cmd("/ma/commande/a/executer"); +# print join(' ',@lines); + +} + + + + sub build_backup_files { -d $save_path or mkdir_p($save_path); -- cgit v1.2.1