https://bugzilla.novell.com/show_bug.cgi?id=861955
https://bugzilla.novell.com/show_bug.cgi?id=861955#c28
Tomáš Chvátal changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED
--- Comment #28 from Tomáš Chvátal 2014-04-15 10:02:54 UTC ---
Hehe, true I didn't try the other case with the enabled vars again.
And used the same solution you suggest :)
-------------------------------------------------------------------
Tue Apr 15 09:52:00 UTC 2014 - tchvatal@suse.com
- Update once more to always hit the same code and to avoid
regressions that are hit only under some setup scenarios.
Index: mlocate.cron
===================================================================
--- mlocate.cron (revision 34)
+++ mlocate.cron (working copy)
@@ -56,15 +56,13 @@
# run the updatedb if possible
if [ -x /usr/bin/updatedb ]; then
- if [ -n "${RUN_UPDATEDB_AS}" ] ; then
- # 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
- # just run it as root
- /usr/bin/updatedb ${NODEVS} ${UPDATEDB_PRUNEFS}
${UPDATEDB_PRUNEPATHS}
+ if [ -z "${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
--
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.