# This is a patch for findutils-4.1.orig to update it to findutils-4.1 # # To apply this patch: # STEP 1: Chdir to the source directory. # STEP 2: Run the 'applypatch' program with this patch file as input. # # If you do not have 'applypatch', it is part of the 'makepatch' package # that you can fetch from the Comprehensive Perl Archive Network: # http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz # In the above URL, 'x' should be 2 or higher. # # To apply this patch without the use of 'applypatch': # STEP 1: Chdir to the source directory. # STEP 2: Run the 'patch' program with this file as input. # #### End of Preamble #### #### Patch data follows #### diff -c 'findutils-4.1.orig/locate/updatedb.sh' 'findutils-4.1/locate/updatedb.sh' Index: ././locate/updatedb.sh *** ././locate/updatedb.sh Tue Oct 4 22:24:18 1994 --- ././locate/updatedb.sh Tue May 1 10:10:55 2001 *************** *** 53,63 **** : ${NETPATHS=} # Directories to not put in the database, which would otherwise be. ! : ${PRUNEPATHS="/tmp /usr/tmp /var/tmp /afs"} # The same, in the form of a regex that find can use. test -z "$PRUNEREGEX" && ! PRUNEREGEX=`echo $PRUNEPATHS|sed -e 's,^,\\\(^,' -e 's, ,$\\\)\\\|\\\(^,g' -e 's,$,$\\\),'` # The database file to build. : address@hidden@} --- 53,63 ---- : ${NETPATHS=} # Directories to not put in the database, which would otherwise be. ! : ${PRUNEPATHS="/tmp /usr/tmp /var/tmp /afs /lost+found"} # The same, in the form of a regex that find can use. test -z "$PRUNEREGEX" && ! PRUNEREGEX=`echo $PRUNEPATHS|sed -e 's,^,\\\(^,' -e 's, ,$\\\)\\\|\\\(^,g' -e 's,$,$\\\),' -e 's,\+,\\\+,'g"` # The database file to build. : address@hidden@} *************** *** 86,91 **** --- 86,101 ---- PATH=$LIBEXECDIR:$BINDIR:/usr/ucb:/bin:/usr/bin:$PATH export PATH + # The command to use to change to the NETUSER, if it's not + # the same as the current user. It will be followed by the + # command to be run, so include any flags required to recognize + # the command + if test "$NETUSER" = "$USER" ; then + su_cmd="" + else + su_cmd="su $NETUSER -c" + fi + # Make and code the file list. # Sort case insensitively for users' convenience. *************** *** 99,105 **** fi if test -n "$NETPATHS"; then ! su $NETUSER -c \ "$find $NETPATHS \\( -type d -regex \"$PRUNEREGEX\" -prune \\) -o -print" fi } | sort -f | $frcode > $LOCATE_DB.n --- 109,115 ---- fi if test -n "$NETPATHS"; then ! eval $su_cmd \ "$find $NETPATHS \\( -type d -regex \"$PRUNEREGEX\" -prune \\) -o -print" fi } | sort -f | $frcode > $LOCATE_DB.n *************** *** 130,136 **** \( -fstype nfs -o -fstype NFS -o -type d -regex "$PRUNEREGEX" \) -prune -o -print fi if test -n "$NETPATHS"; then ! su $NETUSER -c \ "$find $NETPATHS \\( -type d -regex \"$PRUNEREGEX\" -prune \\) -o -print" fi } | tr / '\001' | sort -f | tr '\001' / > $filelist --- 140,146 ---- \( -fstype nfs -o -fstype NFS -o -type d -regex "$PRUNEREGEX" \) -prune -o -print fi if test -n "$NETPATHS"; then ! eval $su_cmd \ "$find $NETPATHS \\( -type d -regex \"$PRUNEREGEX\" -prune \\) -o -print" fi } | tr / '\001' | sort -f | tr '\001' / > $filelist #### End of Patch data #### #### ApplyPatch data follows #### # Data version : 1.0 # Date generated : Tue May 1 10:11:04 2001 # Generated by : makepatch 2.00 # Recurse directories : Yes # p './locate/updatedb.sh' 4384 988726255 0100644 #### End of ApplyPatch data #### #### End of Patch kit [created: Tue May 1 10:11:04 2001] #### #### Checksum: 111 3624 6725 ####