aboutsummaryrefslogtreecommitdiffstats
path: root/ftp/mirror/files/patch-ac
blob: 254a5a6afefe434807353cedc29dae0539061351 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
*** mirror.pl.orig	Thu Jun 15 19:15:46 1995
--- mirror.pl	Thu Jun 15 19:15:26 1995
***************
*** 42,48 ****
  
  # Try to find the default localation of various programs via
  # the users PATH then using $extra_path
! $extra_path = '/usr/local/bin:/usr/new/bin:/usr/public/bin:/usr/ucb:/usr/bin:/bin:/etc:/usr/etc:/usr/local/etc:';
  $ENV{ 'PATH' } .= ':' . $extra_path;
  
  # If compressing a local file to send need somewhere to store the temp
--- 42,48 ----
  
  # Try to find the default localation of various programs via
  # the users PATH then using $extra_path
! $extra_path = '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:';
  $ENV{ 'PATH' } .= ':' . $extra_path;
  
  # If compressing a local file to send need somewhere to store the temp
***************
*** 90,108 ****
  $rm_prog = &find_prog( 'rm' );
  
  # Generate checksums
! $sum_prog = &find_prog( 'sum' );
  
  # SPECIAL NOTE: This is eval'd, so DONT put double-quotes (") in it.
  # You can get local variables to appear as in the second example:
! $mail_subject = '-s \'mirror update\'';
! # $mail_subject = ' -s \'mirror update of $package\'';
  
  # When scanning the local directory, how often to prod the remote
  # system to keep the connection alive
  $prod_interval = 60;
  
  # Put the directory that mirror is actually in at the start of PERLLIB.
! $dir = &real_dir_from_path( $0 );
  unshift( @INC, $dir );
  
  # Make sure that your PERLLIB environment variable can get you
--- 90,109 ----
  $rm_prog = &find_prog( 'rm' );
  
  # Generate checksums
! $sum_prog = &find_prog( 'md5' );
  
  # SPECIAL NOTE: This is eval'd, so DONT put double-quotes (") in it.
  # You can get local variables to appear as in the second example:
! # $mail_subject = '-s \'mirror update\'';
! $mail_subject = ' -s \'mirror update of $package\'';
  
  # When scanning the local directory, how often to prod the remote
  # system to keep the connection alive
  $prod_interval = 60;
  
  # Put the directory that mirror is actually in at the start of PERLLIB.
! #$dir = &real_dir_from_path( $0 );
! $dir = "!!PREFIX!!/lib/mirror";
  unshift( @INC, $dir );
  
  # Make sure that your PERLLIB environment variable can get you
***************
*** 156,161 ****
--- 157,163 ----
  $default{ 'local_dir' } = '';	# local directory to copy into
  $default{ 'remote_user' } = 'anonymous';  # the remote guest account name
  $default{ 'remote_password' } = "$me@$hostname";
+ $default{ 'remote_acct' } = '';
  $default{ 'get_patt' } = ".";	# regex of pathnames to retrieve
  $default{ 'exclude_patt' } = ''; # regex of pathnames to ignore
  $default{ 'update_local' } = 0;	# Don't just update local dirs
***************
*** 1022,1028 ****
  	if( $con == 1 ){
  		&msg( "login as $remote_user\n" ) if $debug > 1;
  		$curr_remote_user = $remote_user;
! 		if( ! &ftp'login( $remote_user, $remote_password ) ){
  			&msg( "Cannot login, skipping package\n" );
  			&disconnect();
  			&msg( "\n" );
--- 1024,1030 ----
  	if( $con == 1 ){
  		&msg( "login as $remote_user\n" ) if $debug > 1;
  		$curr_remote_user = $remote_user;
! 		if( ! &ftp'login( $remote_user, $remote_password, $remote_acct ) ){
  			&msg( "Cannot login, skipping package\n" );
  			&disconnect();
  			&msg( "\n" );