X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=util-vserver%2Fscripts%2Fchcontext;h=96f5db24a1f969289f492d4feb86004eaee0226a;hb=319929791248f823537ac5fb2fe10a01b5b820b9;hp=20ec07c3df95ab13e72788377f149de60e014ef9;hpb=dfd7c5abfa53e81582a7ca7e88f6ab82dda39085;p=util-vserver.git diff --git a/util-vserver/scripts/chcontext b/util-vserver/scripts/chcontext index 20ec07c..96f5db2 100755 --- a/util-vserver/scripts/chcontext +++ b/util-vserver/scripts/chcontext @@ -110,7 +110,7 @@ OPT_DISCONNECT= OPT_FLAGS=() OPT_SECURE= OPT_SILENT= -OPT_FAKEINIT= +OPT_INITPID= while true; do case "$1" in @@ -122,9 +122,8 @@ while true; do --domainname) OPT_DOMAINNAME=$2; shift;; --hostname) OPT_HOSTNAME=$2; shift;; --flag) - test "$2" = "fakeinit" && \ - OPT_FAKEINIT=--fakeinit || - OPT_FLAGS=( "${OPT_FLAGS[@]}" "$2" ) + test "$2" != "fakeinit" || OPT_INITPID=--initpid + OPT_FLAGS=( "${OPT_FLAGS[@]}" "$2" ) shift ;; --secure) OPT_SECURE=1;; @@ -158,7 +157,7 @@ chain_cmd=( "${chain_cmd[@]}" migrate_cmd=( $_VCONTEXT ${OPT_SILENT:+--silent} ${OPT_DISCONNECT:+--disconnect} - $OPT_FAKEINIT ) + $OPT_INITPID ) "${create_cmd[@]}" "${chain_cmd[@]}" -- \ "${migrate_cmd[@]}" --endsetup --migrate-self -- "$@"