From da726e51c48ee9c70352bca04b3b5ee0867e5c4f Mon Sep 17 00:00:00 2001 From: Enrico Scholz Date: Sun, 3 Jul 2005 17:47:06 +0000 Subject: [PATCH] initSync(): fixed parameter naming initSync(): set 'async' method when 'vwait' is available _waitForVWait(): read pipe after 'wait' returned git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2130 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- util-vserver/scripts/vserver.functions | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/util-vserver/scripts/vserver.functions b/util-vserver/scripts/vserver.functions index a2a56a7..73558ee 100644 --- a/util-vserver/scripts/vserver.functions +++ b/util-vserver/scripts/vserver.functions @@ -771,13 +771,14 @@ function umountVserver test -n "$is_ok" } -## Usage: waitForSync +## Usage: waitForSync function initSync { local _is_meth=sync - test -n "$_NEED_VSHELPER_SYNC" || _is_meth=async + test -n "$_NEED_VSHELPER_SYNC" && \ + ! $_VSERVER_INFO - FEATURE vwait || _is_meth=async - vshelper.initSync "$1" "$2" "$_is_meth" + vshelper.initSync "$1" "$3" "$_is_meth" } ## Usage: initWait @@ -792,7 +793,7 @@ function initWait >>$_is_tmpdir/out 2>$_is_tmpdir/err 3>$_is_tmpdir/fifo & echo "$!" >$_is_tmpdir/pid - eval "$4"=$_is_tmpdir + eval "$3"=$_is_tmpdir fi } @@ -801,8 +802,8 @@ function initWait function _waitForVWait { declare -a status - getFileArray status "$1" wait "$2" || : + getFileArray status "$1" set -- ${status[0]} case "$1" in @@ -817,8 +818,8 @@ killed by sending a SIGKILL signal. Please investigate the reasons and/or increase the timeout in apps/vshelper/sync-timeout." ;; (TIMEOUT|\?\?\?|*) warning $"\ -internal error: 'vwait' exited with an unexpected status; I will try -to continue but be prepared for unexpected events." +internal error: 'vwait' exited with an unexpected status '$1'; I will +try to continue but be prepared for unexpected events." ;; esac -- 1.8.1.5