Use shell expansion instead of basename

This commit is contained in:
Roy Marples 2007-11-23 22:22:50 +00:00
parent 6bc37fd203
commit 168fa73a49

View File

@ -44,8 +44,8 @@ start() {
if [ -z "${moused_device}" ] ; then
local dev=
for dev in /dev/psm[0-9]* /dev/ums[0-9]* ; do
[ -e "${dev}" ] || continue
[ -e /var/run/moused-$(basename "${dev}").pid ] && continue
[ -c "${dev}" ] || continue
[ -e /var/run/moused-"${dev##*/}".pid ] && continue
moused_device=${dev}
eindent
einfo "Using mouse on ${moused_device}"