Update the locate database even if user nobody can't stat root's
home directory. PR: 10700 Submitted by: Sergey Korsak <skif@1plus1.net>
This commit is contained in:
parent
f841485278
commit
e9ebca08d7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=48084
@ -1,6 +1,6 @@
|
||||
#!/bin/sh -
|
||||
#
|
||||
# $Id: 310.locate,v 1.1.1.1 1997/08/16 17:04:02 pst Exp $
|
||||
# $Id: 310.locate,v 1.2 1997/11/01 15:00:40 wosch Exp $
|
||||
#
|
||||
locdb=/var/db/locate.database
|
||||
|
||||
@ -11,6 +11,7 @@ if [ -x /usr/libexec/locate.updatedb -a -f $locdb ] ; then
|
||||
|
||||
touch ${locdb}; chown nobody ${locdb}; chmod 644 ${locdb}
|
||||
|
||||
cd /
|
||||
echo /usr/libexec/locate.updatedb | nice -5 su -fm nobody
|
||||
chmod 444 ${locdb}
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user