Mailinglist Archive: opensuse-bugs (2150 mails)

< Previous Next >
[Bug 861955] mlocate does not respect prunepaths

https://bugzilla.novell.com/show_bug.cgi?id=861955

https://bugzilla.novell.com/show_bug.cgi?id=861955#c26


--- Comment #26 from Peter M√ľnster <pmlists@xxxxxxx> 2014-04-15 09:55:20 UTC ---
Why not just like this:

# run the updatedb if possible
if [ -x /usr/bin/updatedb ]; then
if [ -n "${RUN_UPDATEDB_AS}" ] ; then
RUN_UPDATEDB_AS=root
fi
# change the perms to the var directory to our desired user
chown -R "${RUN_UPDATEDB_AS}":root /var/lib/mlocate
# change the user and run the updatedb under it
/usr/bin/su "${RUN_UPDATEDB_AS}" -c "/usr/bin/updatedb ${NODEVS}
${UPDATEDB_PRUNEFS} ${UPDATEDB_PRUNEPATHS}"
else
echo >&2 "Warning: \"/usr/bin/updatedb\" is not executable, unable to run
updatedb."
exit 0
fi

Peter

--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
< Previous Next >