version 1.5, 2002/09/05 17:20:46
|
version 1.6, 2002/11/04 02:52:39
|
Line 395 if (defined $opt_ftp || $FTP) {
|
Line 395 if (defined $opt_ftp || $FTP) {
|
die "Either $RPMDIR does not exist or it does not contain any packages.\n"; |
die "Either $RPMDIR does not exist or it does not contain any packages.\n"; |
} |
} |
|
|
|
my $FTPSERVER_auth = $FTPSERVER; |
|
$FTPSERVER_auth =~ s/^(\w+)\:(\w+)\@/-u $1 -p $2 /; |
|
|
if ($recheck) { |
if ($recheck) { |
$questionable=1; |
$questionable=1; |
} |
} |
Line 564 for (@local_rpm_list) {
|
Line 567 for (@local_rpm_list) {
|
} |
} |
} |
} |
|
|
|
|
if ($recheck && @q_updates) { |
if ($recheck && @q_updates) { |
if ($ftp) { |
if ($ftp) { |
for (@q_updates) { |
for (@q_updates) { |
Line 573 if ($recheck && @q_updates) {
|
Line 577 if ($recheck && @q_updates) {
|
if ($verbose) { |
if ($verbose) { |
print "Getting questionable packages form $FTPSERVER ...\n"; |
print "Getting questionable packages form $FTPSERVER ...\n"; |
} |
} |
my $status = system("$FTPGET $FTPSERVER $RPMDIR @ftp_files"); |
my $status = system("$FTPGET $FTPSERVER_auth $RPMDIR @ftp_files"); |
if ($status) { |
if ($status) { |
if ($< == 0) { |
if ($< == 0) { |
# if we are running as root exit to avoid symlink attacks, etc. |
# if we are running as root exit to avoid symlink attacks, etc. |
|
print("DEBUG DEBUG $FTPGET $FTPSERVER_auth $RPMDIR @ftp_files"); |
die "$FTPGET failed with status ", $status/256, ".\n"; |
die "$FTPGET failed with status ", $status/256, ".\n"; |
} else { |
} else { |
print STDERR "warning: $FTPGET failed with status ", $status/256, ".\n"; |
print STDERR "warning: $FTPGET failed with status ", $status/256, ".\n"; |
Line 618 if (@updates) {
|
Line 623 if (@updates) {
|
if ($verbose) { |
if ($verbose) { |
print "starting downloads ... \n"; |
print "starting downloads ... \n"; |
} |
} |
my $status = system("$FTPGET $FTPSERVER $RPMDIR @ftp_files"); |
my $status = system("$FTPGET $FTPSERVER_auth $RPMDIR @ftp_files"); |
if ($status) { |
if ($status) { |
if ($< == 0) { |
if ($< == 0) { |
# if we are running as root exit to avoid symlink attacks, etc. |
# if we are running as root exit to avoid symlink attacks, etc. |
Line 655 if (@q_updates && $questionable) {
|
Line 660 if (@q_updates && $questionable) {
|
} |
} |
if ($verbose) { |
if ($verbose) { |
print "starting downloads ... \n"; |
print "starting downloads ... \n"; |
system("$FTPGET $FTPSERVER $$RPMDIR @ftp_files"); |
system("$FTPGET $FTPSERVER_auth $$RPMDIR @ftp_files"); |
print "... done.\n"; |
print "... done.\n"; |
} else { |
} else { |
system("$FTPGET $FTPSERVER $$RPMDIR @ftp_files"); |
system("$FTPGET $FTPSERVER_auth $$RPMDIR @ftp_files"); |
} |
} |
} |
} |
} |
} |
Line 689 sub ftp_download {
|
Line 694 sub ftp_download {
|
my ($arch) = m/[^ ]*-[^-]+-[^-]*\.(\w+)\.rpm$/; |
my ($arch) = m/[^ ]*-[^-]+-[^-]*\.(\w+)\.rpm$/; |
push(@ftp_packages,"$FTPDIR/$arch/$_"); |
push(@ftp_packages,"$FTPDIR/$arch/$_"); |
} |
} |
my $status = system("$FTPGET $FTPSERVER $downloaddir @ftp_packages"); |
my $status = system("$FTPGET $FTPSERVER_auth $downloaddir @ftp_packages"); |
return $status; |
return $status; |
} |
} |
|
|