[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: two suggestions for enhancements
From: |
Danny Sadinoff |
Subject: |
Re: two suggestions for enhancements |
Date: |
Thu, 20 Mar 2003 15:22:51 -0500 |
User-agent: |
Mutt/1.4i |
Here's my delta. I only implemented --no-su, since it was the su that
was causing the background processing anyways.
*** updatedb Thu Mar 20 13:59:28 2003
--- /opt/gnu-1.2/bin/updatedb Mon Jun 26 00:24:19 2000
***************
*** 20,26 ****
usage="\
Usage: updatedb [--localpaths='dir1 dir2...'] [--netpaths='dir1 dir2...']
! [--prunepaths='dir1 dir2...'] [--output=dbfile] [--netuser=user]
[--no-su]
[--old-format] [--version] [--help]"
old=no
--- 20,26 ----
usage="\
Usage: updatedb [--localpaths='dir1 dir2...'] [--netpaths='dir1 dir2...']
! [--prunepaths='dir1 dir2...'] [--output=dbfile] [--netuser=user]
[--old-format] [--version] [--help]"
old=no
***************
*** 34,40 ****
--prunepaths) PRUNEPATHS="$val" ;;
--output) LOCATE_DB="$val" ;;
--netuser) NETUSER="$val" ;;
- --no-su) NO_SU=1 ;;
--old-format) old=yes ;;
--version) echo "GNU updatedb version 4.1"; exit 0 ;;
--help) echo "$usage"; exit 0 ;;
--- 34,39 ----
***************
*** 99,109 ****
\( -fstype nfs -o -fstype NFS -o -type d -regex "$PRUNEREGEX" \) -prune -o
-print
fi
! if test -n "$NO_SU"; then
! $find $NETPATHS \( -type d -regex "$PRUNEREGEX" -prune \) -o -print ;
! elif test -n "$NETPATHS" ; then
su $NETUSER -c \
! "$find $NETPATHS \\( -type d -regex \"$PRUNEREGEX\" -prune \\) -o -print" ;
fi
} | sort -f | $frcode > $LOCATE_DB.n
--- 98,106 ----
\( -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
} | sort -f | $frcode > $LOCATE_DB.n
***************
*** 132,143 ****
$find $SEARCHPATHS \
\( -fstype nfs -o -fstype NFS -o -type d -regex "$PRUNEREGEX" \) -prune -o
-print
fi
!
! if test -n "$NO_SU"; then
! $find $NETPATHS \( -type d -regex "$PRUNEREGEX" -prune \) -o -print ;
! elif test -n "$NETPATHS"; then
su $NETUSER -c \
! "$find $NETPATHS \\( -type d -regex \"$PRUNEREGEX\" -prune \\) -o -print" ;
fi
} | tr / '\001' | sort -f | tr '\001' / > $filelist
--- 129,137 ----
$find $SEARCHPATHS \
\( -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