$NetBSD: patch-ac,v 1.3 1998/08/29 18:05:56 kim Exp $ --- mirror.pl.orig Mon Sep 18 13:55:25 1995 +++ mirror.pl Sat Aug 29 12:06:10 1998 @@ -75,7 +75,7 @@ # 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'; +$extra_path = '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:!!PREFIX!!/bin:!!PREFIX!!/sbin'; $ENV{ 'PATH' } .= ':' . $extra_path; &trap_signals(); @@ -128,19 +128,20 @@ $rm_prog = &find_prog( 'rm' ); # Generate checksums -$sum_prog = &find_prog( 'sum' ); +$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\''; +# $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 = &real_dir_from_path( $0 ); +$dir = "!!PREFIX!!/lib/mirror"; unshift( @INC, $dir ); # Make sure that your PERLLIB environment variable can get you @@ -1695,7 +1696,7 @@ $f = $dirtmp; $dirtmp =~ s/\.($sys_compress_suffix|$gzip_suffix|$old_gzip_suffix)$//; $udirtmp =~ s/\.($sys_compress_suffix|$gzip_suffix|$old_gzip_suffix)$//; - &sys( "$unsquish -d < \"$f\" > \"$dirtmp\"" ); + &sys( "$unsquish -f -d < \"$f\" > \"$dirtmp\"" ); unlink( $uf ); } else { @@ -2542,7 +2543,7 @@ local( $f ) = $src_file; $f =~ s/($shell_metachars)/\\$1/g; $comptemp = "$big_temp/.out$$"; - &sys( "$compress_prog < \"$f\" > \"$comptemp\"" ); + &sys( "$compress_prog -f < \"$f\" > \"$comptemp\"" ); $src_file = $comptemp; } @@ -2613,10 +2614,10 @@ # Am I doing compress to gzip conversion? if( $src_path =~ /$compress_conv_patt/ && $compress_suffix eq $gzip_suffix ){ - $comp = "$sys_compress_prog -d < \"$f\" | $gzip_prog > \"$temp\""; + $comp = "$sys_compress_prog -f -d < \"$f\" | $gzip_prog > \"$temp\""; } else { - $comp = "$compress_prog < \"$f\" > \"$temp\""; + $comp = "$compress_prog -f < \"$f\" > \"$temp\""; } &sys( $comp ); $temp =~ s/\\($shell_metachars)/$1/g; @@ -3227,7 +3228,7 @@ &msg( "creating assocs ...\n" ) if $debug > 2; foreach $map ( @assocs ){ - eval "\$$map = \"\$big_tmp/$map.$$\""; + eval "\$$map = \"\$big_temp/$map.$$\""; eval "dbmopen( $map, \$$map, 0644 )"; } &msg( "creating assocs done\n" ) if $debug > 2; @@ -3239,7 +3240,7 @@ &msg( "deleting assocs ...\n" ) if $debug > 2; foreach $map ( @assocs ){ - eval "\$$map = \"\$big_tmp/$map.$$\""; + eval "\$$map = \"\$big_temp/$map.$$\""; eval "dbmclose( $map )"; &unlink_dbm( eval "\$$map" ); eval "\%$map = ()";