Path: blob/main/ftp/mirror/files/patch-mirror.pl
16462 views
--- mirror.pl.orig Mon Jun 8 12:55:27 19981+++ mirror.pl Tue Jun 1 16:24:17 20042@@ -104,7 +104,7 @@3# Try to find the default location of various programs via4# the users PATH then using $extra_path5if( ! $on_win ){6- $extra_path = '/usr/local/bin:/usr/new/bin:/usr/public/bin:/usr/ucb:/usr/bin:/bin:/etc:/usr/etc:/usr/local/etc';7+ $extra_path = '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin';8}9if( $extra_path ne '' ){10$ENV{ 'PATH' } .= $path_sep . $extra_path;11@@ -159,19 +159,20 @@12$rm_prog = &find_prog( 'rm' );1314# Generate checksums15-$sum_prog = &find_prog( 'sum' );16+$sum_prog = &find_prog( 'md5' );1718# SPECIAL NOTE: This is eval'd, so DONT put double-quotes (") in it.19# You can get local variables to appear as in the second example:20-$mail_subject = '-s \'mirror update\'';21-# $mail_subject = ' -s \'mirror update of $package\'';22+# $mail_subject = '-s \'mirror update\'';23+$mail_subject = ' -s \'mirror update of $package\'';2425# When scanning the local directory, how often to prod the remote26# system to keep the connection alive27$prod_interval = 60;2829# Put the directory that mirror is actually in at the start of PERLLIB.30-$dir = &real_dir_from_path( $0 );31+# $dir = &real_dir_from_path( $0 );32+$dir = "/usr/local/lib/mirror";33unshift( @INC, $dir );3435# Debian GNU/Linux stores mirror.defaults in /etc/mirror36@@ -1322,8 +1323,11 @@3738# Create a get_patt from the contents of the local directory39if( $update_local && $#get_top >= 0 ){40- $get_patt = '^' . join( '|^', @get_top );41- $get_patt =~ s/$squished//g;42+ my ($path,$re,@re_patt);43+ #$get_patt = '^' . join( '|^', @get_top );44+ #$get_patt =~ s/$squished//g;45+ foreach $path ( @get_top ) { push @re_patt, "\^\Q$path\E\$"; }46+ $get_patt= join( '|', @re_patt );47&msg( "get_patt = $get_patt\n" ) if $debug;48}49505152