mkdir -p -m755 "$VDIR"
$_SETATTR --~barrier "$VDIR"
+ $_SETATTR --barrier "$VDIR"/.. || colwarn $"\
+WARNING: could not set the barrier attribute on '$VDIR/..',
+ please set it manually."
base._addGeneratedFile "$VDIR"
mkdir -p -m755 "$SETUP_CONFDIR"/apps "$VDIR"/etc
function startSleepingGuest
{
local guest="$1"
- local timeout="$2"
+ local timeout="${2:-15}"
$_VSERVER "$guest" start --rescue --rescue-init bash -c "
exec > /dev/null
exec 2> /dev/null
trap 'kill -s 9 -- -1; exit 0' INT
- sleep $timeout
+ i=0
+ while [ \$i -lt $timeout ]; do
+ sleep 1
+ let ++i
+ done
kill -s 15 -- -1
sleep 1
kill -s 9 -- -1"
function stopSleepingGuest
{
local guest="$1"
- $_VKILL --xid "$guest" -s INT -- 1
+ $_VSERVER "$guest" stop --rescue-init
}