TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:9249] slocate (was: Re: [TCLUG:9212] system colors)



well i don't really know but it seems you're missing an if ... fi

My working /etc/cron.daily/slocate.cron is attached.

.ryan

#!/bin/sh

NETMOUNTS=`mount -t nfs,smbfs,ncpfs | cut -d ' ' -f 3`
NETPATHS=`echo $NETMOUNTS | sed -e 's| |,|g'`

if [ -n "$NETPATHS" ]; then
  /usr/bin/slocate -u -e "$NETPATHS,/tmp,/var/tmp,/usr/tmp,/afs,/net,/proc"
else
  /usr/bin/slocate -u -e "/tmp,/var/tmp,/usr/tmp,/afs,/net,/proc"
fi