X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=util-vserver%2Fscripts%2Fvserver.functions;h=6c9645b5b982c3542bceb768f32595a4d8926e8e;hb=b38d70e7594b43cdd63b9e27ea5783001ef8407c;hp=e87afe3afb81b0ace8cf1c80e7c6e80d9df574fb;hpb=bbc69d59f75750e728b98e7a6f054780329a6785;p=util-vserver.git diff --git a/util-vserver/scripts/vserver.functions b/util-vserver/scripts/vserver.functions index e87afe3..6c9645b 100644 --- a/util-vserver/scripts/vserver.functions +++ b/util-vserver/scripts/vserver.functions @@ -127,6 +127,23 @@ function getEnterShell } } +## Usage: sendKillSequence [ ]* +function sendKillSequence +{ + local ctx=$1 + local wait= + shift + + while isCtxRunning "$ctx"; do + test -z "$wait" || sleep "$wait" + + $_VKILL -c "$ctx" ${1:+-s "$1"} + test "$2" || break + wait="$2" + shift 2 + done +} + function _generateInitOptions { local vdir=$1 @@ -149,7 +166,7 @@ function _generateInitOptions getFileValue runlevel_start "$cfgdir"/runlevel getFileValue runlevel_start "$cfgdir"/runlevel.start getFileValue runlevel_stop "$cfgdir"/runlevel.stop - getFileArray INITKILL_SEQ "$cfgdir"/killseq + getFileArray INITKILL_SEQ "$cfgdir"/killseq case x"$INITSTYLE" in xsysv) @@ -456,8 +473,8 @@ function umountVserver x#*) continue;; esac - $_CHBIND "${CHBIND_OPTS[@]}" \ - $_SECURE_UMOUNT "$dst" || is_ok= + $_CHBIND "${CHBIND_OPTS[@]}" $_EXEC_CD "$dst" \ + $_UMOUNT -lfn . || is_ok= done popd >/dev/null