]>
Commit | Line | Data |
---|---|---|
bfea8d7d MT |
1 | #!/bin/bash |
2 | ||
3 | [ -x "/usr/bin/updatedb" ] || exit 0 | |
4 | ||
5 | LOCKFILE="/var/lib/locate/updatedb.lock" | |
6 | ||
7 | trap "rm -f $LOCKFILE" EXIT | |
8 | ||
9 | if [ -e "$LOCKFILE" ]; then | |
10 | echo >&2 "Warning: $LOCKFILE present, not running updatedb." | |
11 | exit 1 | |
12 | else | |
13 | touch "$LOCKFILE" | |
14 | fi | |
15 | ||
d79fbce4 | 16 | /usr/bin/updatedb |