[devmon 1.1.1] use pmount ahead of udisks; test executables

This commit is contained in:
IgnorantGuru 2012-05-28 09:45:36 -06:00
parent 3f1909b233
commit 693fbc6b02
2 changed files with 15 additions and 14 deletions

View File

@ -2,6 +2,7 @@
allow unmount removed devices
[devmon 1.1.1] unmount removed devices if mounted
mounted messages to stdout instead of stderr
[devmon 1.1.1] use pmount ahead of udisks; test executables
0.2.3 2012-05-27:
create /run/media/$USER on demand; add configure --with-setfacl-prog
corrected Arch Linux udevil-git AUR package overwriting udevil.conf

View File

@ -304,37 +304,37 @@ udisks1=`which udisks`
udisks2=`which udisksctl`
pmount=`which pmount`
if [ "$udevil" != "" ]; then
if [ "$udevil" != "" ] && [ -x "$udevil" ]; then
info_cmd="$udevil"
elif [ "$udisks1" != "" ]; then
elif [ "$udisks1" != "" ] && [ -x "$udisks1" ]; then
info_cmd="$udisks1"
else
echo "WARNING: devmon can't find udevil or udisks v1 for device monitoring" 1>&2
echo "WARNING: devmon can't run udevil or udisks v1 for device monitoring" 1>&2
info_cmd="udevil"
fi
if [ "$udevil" != "" ]; then
if [ "$udevil" != "" ] && [ -x "$udevil" ]; then
if [ -u "$udevil" ] || [ "$(whoami)" = "root" ]; then
mount_cmd="$udevil"
fi
fi
if [ "$mount_cmd" = "" ] && [ "$udisks1" != "" ]; then
mount_cmd="$udisks1"
fi
if [ "$mount_cmd" = "" ] && [ "$udisks2" != "" ]; then
mount_cmd="$udisks2"
fi
if [ "$mount_cmd" = "" ] && [ "$pmount" != "" ]; then
if [ "$mount_cmd" = "" ] && [ "$pmount" != "" ] && [ -x "$pmount" ]; then
if [ -u "$pmount" ] || [ "$(whoami)" = "root" ]; then
mount_cmd="$pmount"
fi
fi
if [ "$mount_cmd" = "" ] && [ "$udisks1" != "" ] && [ -x "$udisks1" ]; then
mount_cmd="$udisks1"
fi
if [ "$mount_cmd" = "" ] && [ "$udisks2" != "" ] && [ -x "$udisks2" ]; then
mount_cmd="$udisks2"
fi
if [ "$mount_cmd" = "" ]; then
echo "WARNING: devmon can't run udevil, udisks, or pmount for mounting" 1>&2
echo "WARNING: devmon can't run udevil, pmount, or udisks for mounting" 1>&2
mount_cmd="udevil"
fi