exit 0
}
+## Usage: isNumber <arg>
function isNumber
{
local tmp
return 0
}
+_UV_LOCKS=''
+## Usage: lock <lockfile> [<timeout>]
+function lock
+{
+ local tmp=$(mktemp /tmp/vserver-lock.XXXXXX)
+ rm -f $tmp
+ mkfifo -m600 $tmp
+
+ sleep 10
+ $_LOCKFILE "$1" $tmp $2 &
+ cat <$tmp >/dev/null
+
+ _UV_LOCKS="$! $_UV_LOCKS"
+}
+
+## Usage: unlock [<num>]
+function unlock
+{
+ local num=$1
+ local i
+
+ set -- $_UV_LOCKS
+ while test "$#" -gt 0; do
+ kill -HUP "$1" >/dev/null || :
+ shift
+ test "$num" != 1 || break
+ test -z "$num" || let --num
+ done
+ _UV_LOCKS="$@"
+}
+
function _pkgMountBindDir()
{
test "$1" != "$2" || return 0