ENTER_SHELL=()
- getFileValue ENTER_SHELL "$vdir"/shell "$CONFDIR"/.defaults/shell
+ getFileValue ENTER_SHELL "$vdir"/shell "$__CONFDIR"/.defaults/shell
test -n "$ENTER_SHELL" || {
local i
while isCtxRunning "$ctx"; do
test -z "$wait" || sleep "$wait"
-
- $_VKILL -c "$ctx" ${1:+-s "$1"} 2>/dev/null || :
+
+ killContext "$ctx" "$1"
test -n "$2" || break
wait="$2"
shift 2
_IS_FAKEINIT=1
INITCMD_START_SYNC=( "$_INITSYNC_MINIT_START" "$vdir" )
_NEED_VSHELPER_SYNC=1
- test -z "$RUNLEVEL_START" || INITCMD_START=( "${INITCMD_START[@]}" "$RUNLEVEL_START" )
- test -z "$RUNLEVEL_STOP" || INITCMD_STOP=( "${INITCMD_STOP[@]}" "$RUNLEVEL_STOP" )
+ test -z "$RUNLEVEL_START" || INITCMD_START=( "${INITCMD_START[@]}" "$RUNLEVEL_START" )
+ test -z "$RUNLEVEL_STOP" || INITCMD_STOP=( "${INITCMD_STOP[@]}" "$RUNLEVEL_STOP" )
+ ! isNumber "${RUNLEVEL_START:-3}" || INITCMD_PREPARE=( $_FAKE_RUNLEVEL "${RUNLEVEL_START:-3}" /var/run/utmp )
;;
(xgentoo)
local i=0
declare -a var
- lock "$LOCKDIR"/vserver.interfaces
+ lock "$__LOCKDIR"/vserver.interfaces
while test $i -lt $INTERFACE_CMDS_IDX; do
eval var='( "${INTERFACE_CMDS_'$i'[@]}" )'
local i=$INTERFACE_CMDS_IDX
declare -a var
- lock "$LOCKDIR"/vserver.interfaces
+ lock "$__LOCKDIR"/vserver.interfaces
while test $i -gt 0; do
let --i || :
-e "$cfgdir"/fstab.local -o \
-e "$cfgdir"/fstab.remote || return 0
- findObject -r mtab_src "$vdir"/apps/init/mtab "$CONFDIR"/.defaults/init/mtab "$PKGLIBDEFAULTDIR"/mtab /dev/null
+ findObject -r mtab_src "$cfgdir"/apps/init/mtab "$__CONFDIR"/.defaults/init/mtab "$__PKGLIBDEFAULTDIR"/mtab /dev/null
pushd "$vdir" >/dev/null
$_CHROOT_CAT /etc/mtab <"$mtab_src"
## Usage: waitForSync <vserver> <vshelper-fifo-varname>
function initSync
{
- test -z "$_NEED_VSHELPER_SYNC" || vshelper.initSync "$1" "$2"
+ local _is_meth=sync
+ test -n "$_NEED_VSHELPER_SYNC" || _is_meth=async
+
+ vshelper.initSync "$1" "$2" "$_is_meth"
}
## Usage: waitForSync <vserver> [<vshelper-fifo>]
A timeout or other error occured while waiting for the synchronization
signal from vserver '$VSERVER_NAME'.
The vserver will be killed nevertheless..."
- elif test -n "${#INITCMD_STOP_SYNC[@]}" -ne 0; then
+ elif test "${#INITCMD_STOP_SYNC[@]}" -ne 0; then
"${INITCMD_STOP_SYNC[@]}" || \
warning $"\
Stop-synchronization for vserver '$VSERVER_NAME' failed. The vserver
declare -r flavor=$3
local base i
- for base in "$vdir"/scripts "$CONFDIR"/.defaults/scripts; do
+ for base in "$vdir"/scripts "$__CONFDIR"/.defaults/scripts; do
local DONT_SKIP_DEFAULTS=
local already_handled=