mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
* Removed autoconf TODO fixed in last commit
* Dan McGee <dpmcgee@gmail.com> pacman-optimize checking fixes
This commit is contained in:
parent
d59585c24f
commit
5e2d757c34
@ -20,7 +20,7 @@
|
||||
# USA.
|
||||
#
|
||||
|
||||
myver='2.9.8'
|
||||
myver='3.0.0'
|
||||
|
||||
usage() {
|
||||
echo "pacman-optimize $myver"
|
||||
@ -59,10 +59,6 @@ if [ "$1" != "" ]; then
|
||||
dbroot=$1
|
||||
fi
|
||||
|
||||
if [ "`id -u`" != 0 ]; then
|
||||
die "You must be root to optimize the database"
|
||||
fi
|
||||
|
||||
# make sure pacman isn't running
|
||||
if [ -f /tmp/pacman.lck ]; then
|
||||
die "Pacman lockfile was found. Cannot run while pacman is running."
|
||||
@ -72,6 +68,11 @@ if [ ! -d $dbroot ]; then
|
||||
die "$dbroot does not exist or is not a directory"
|
||||
fi
|
||||
|
||||
#if [ "$EUID" != 0 ]; then
|
||||
if [ ! -w "$dbroot" ]; then
|
||||
die "You must have correct permissions to optimize the database"
|
||||
fi
|
||||
|
||||
# don't let pacman run while we do this
|
||||
touch /tmp/pacman.lck
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user