--- findutils/locate/updatedb.1.orig 2004-11-06 22:33:54.000000000 +0100 +++ findutils/locate/updatedb.1 2004-11-07 10:56:33.000000000 +0100 @@ -41,6 +41,11 @@ produce incorrect results if given a new-format database. .SH OPTIONS .TP +.B \-\-findoptions='\fI\-option1 \-option2...\fP' +Global options to pass on to \fBfind\fP. +The environment variable \fBFINDOPTIONS\fP also sets this value. +Default is none. +.TP .B \-\-localpaths='\fIpath1 path2...\fP' Non-network directories to put in the database. Default is /. --- findutils/locate/updatedb.sh.orig 2004-11-06 22:33:54.000000000 +0100 +++ findutils/locate/updatedb.sh 2004-11-07 10:41:47.000000000 +0100 @@ -20,7 +20,8 @@ # csh original by James Woods; sh conversion by David MacKenzie. usage="\ -Usage: updatedb [--localpaths='dir1 dir2...'] [--netpaths='dir1 dir2...'] +Usage: updatedb [--findoptions='-option1 -option2...'] + [--localpaths='dir1 dir2...'] [--netpaths='dir1 dir2...'] [--prunepaths='dir1 dir2...'] [--prunefs='fs1 fs2...'] [--output=dbfile] [--netuser=user] [--localuser=user] [--old-format] [--version] [--help] @@ -38,6 +39,7 @@ opt=`echo $arg|sed 's/^\([^=]*\).*/\1/'` || exit 71 val=`echo $arg|sed 's/^[^=]*=\(.*\)/\1/'` || exit 71 case "$opt" in + --findoptions) FINDOPTIONS="$val" ;; --localpaths) SEARCHPATHS="$val" ;; --netpaths) NETPATHS="$val" ;; --prunepaths) PRUNEPATHS="$val" ;; @@ -84,6 +86,9 @@ # You can set these in the environment, or use command-line options, # to override their defaults: +# Any global options for find? +: ${FINDOPTIONS=} + # What shell shoud we use? We should use a POSIX-ish sh. : ${SHELL="/bin/sh"} @@ -163,12 +168,12 @@ if [ "$LOCALUSER" != "" ]; then # : A1 su $LOCALUSER -s $SHELL -c \ - "$find $SEARCHPATHS \ + "$find $FINDOPTIONS $SEARCHPATHS \ \\( $prunefs_exp \ -type d -regex '$PRUNEREGEX' \\) -prune -o $print_option" else # : A2 - $find $SEARCHPATHS \ + $find $FINDOPTIONS $SEARCHPATHS \ \( $prunefs_exp \ -type d -regex "$PRUNEREGEX" \) -prune -o $print_option fi @@ -179,11 +184,11 @@ if [ "$myuid" = 0 ]; then # : A3 su $NETUSER -s $SHELL -c \ - "$find $NETPATHS \\( -type d -regex '$PRUNEREGEX' -prune \\) -o $print_option" || + "$find $FINDOPTIONS $NETPATHS \\( -type d -regex '$PRUNEREGEX' -prune \\) -o $print_option" || exit $? else # : A4 - $find $NETPATHS \( -type d -regex "$PRUNEREGEX" -prune \) -o $print_option || + $find $FINDOPTIONS $NETPATHS \( -type d -regex "$PRUNEREGEX" -prune \) -o $print_option || exit $? fi fi @@ -233,12 +238,12 @@ if [ "$LOCALUSER" != "" ]; then # : A5 su $LOCALUSER -s $SHELL -c \ - "$find $SEARCHPATHS \ + "$find $FINDOPTIONS $SEARCHPATHS \ \( $prunefs_exp \ -type d -regex '$PRUNEREGEX' \) -prune -o $print_option" || exit $? else # : A6 - $find $SEARCHPATHS \ + $find $FINDOPTIONS $SEARCHPATHS \ \( $prunefs_exp \ -type d -regex "$PRUNEREGEX" \) -prune -o $print_option || exit $? fi @@ -249,11 +254,11 @@ if [ "$myuid" = 0 ]; then # : A7 su $NETUSER -s $SHELL -c \ - "$find $NETPATHS \\( -type d -regex '$PRUNEREGEX' -prune \\) -o $print_option" || + "$find $FINDOPTIONS $NETPATHS \\( -type d -regex '$PRUNEREGEX' -prune \\) -o $print_option" || exit $? else # : A8 - $find $NETPATHS \( -type d -regex "$PRUNEREGEX" -prune \) -o $print_option || + $find $FINDOPTIONS $NETPATHS \( -type d -regex "$PRUNEREGEX" -prune \) -o $print_option || exit $? fi fi --- findutils/doc/find.texi.orig 2004-11-06 22:33:47.000000000 +0100 +++ findutils/doc/find.texi 2004-11-07 11:03:13.000000000 +0100 @@ -2012,6 +2012,11 @@ database contains entries for: @table @code +@item --findoptions='@var{OPTION}@dots{}' +Global options to pass on to @code{find}. +The environment variable @code{FINDOPTIONS} also sets this value. +Default is none. + @item --localpaths='@var{path}@dots{}' Non-network directories to put in the database. Default is @file{/}. @@ -2312,6 +2317,11 @@ @end example @table @code +@item --findoptions='@var{OPTION}@dots{}' +Global options to pass on to @code{find}. +The environment variable @code{FINDOPTIONS} also sets this value. +Default is none. + @item --localpaths='@var{path}@dots{}' Non-network directories to put in the database. Default is @file{/}.