LOCKFILE=util-vserver
. "$_LIB_VSERVER_INIT_FUNCTIONS"
+. "$_LIB_FUNCTIONS"
+. "$__PKGLIBDIR/vserver.functions"
function set_helper()
test $alive = 0
}
+function create_dirs()
+{
+ $_MKDIR -p "$__RUNDIR" && $_MKDIR -p "$__VSHELPERSTATEDIR" && $_MKDIR -p `getPhysicalDir "$__PKGSTATEREVDIR"`
+}
+
function start()
{
+ _beginResult $"Creating required directories"
+ create_dirs
+ _endResult $?
_beginResult $"Setting path to vshelper"
set_helper
_endResult $?
local retval=$?
+ _beginResult $"Loading default device map"
+ loadDeviceMap 0 "$__CONFDIR/.defaults/apps/vdevmap"
+ _endResult $?
test "$retval" -ne 0 || touch "$lockfile"
return $retval
}
_beginResult $"Stopping all running guests"
$_START_VSERVERS -j 1 --all --stop
_endResult $?
- local retval=$?
_beginResult $"Killing all running contexts"
kill_contexts
_endResult $?
+ local retval=$?
$_RM -f "$lockfile"
+ return $retval
}
function restart()
;;
status)
test -f $lockfile && {
- echo $"/proc entries were fixed"
+ echo $"Path to vshelper has been set"
exit 0
}
- echo $"/proc entries are not fixed"
+ echo $"Path to vshelper has not been set"
exit 1
;;
*)