2 # Copyright 1999-2007 Gentoo Foundation
3 # Distributed under the terms of the GNU General Public License v2
6 : ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
7 if [ ! -e ${UTIL_VSERVER_VARS} ]; then
8 eerror "Cannot find util-vserver installation"
9 eerror "(the file '$UTIL_VSERVER_VARS' would be expected)"
13 . ${UTIL_VSERVER_VARS}
15 ebegin "Creating directories for $PACKAGE_NAME"
16 $__PKGLIBDIR/bash-wrapper 'create_dirs'
19 ebegin "Setting vshelper path to $_VSHELPER"
20 $__PKGLIBDIR/bash-wrapper 'create_dirs'
23 ebegin "Loading default device map"
24 $__PKGLIBDIR/bash-wrapper 'handleDeviceMap --set 0 "$__CONFDIR/.defaults/apps/vdevmap"'
27 $__PKGLIBDIR/bash-wrapper 'hasCgroup'
29 ebegin "Mounting cgroup-hierarchy"
30 $__PKGLIBDIR/bash-wrapper 'mount_cgroup'
36 : ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
37 if [ ! -e ${UTIL_VSERVER_VARS} ]; then
38 eerror "Cannot find util-vserver installation"
39 eerror "(the file '$UTIL_VSERVER_VARS' would be expected)"
43 . ${UTIL_VSERVER_VARS}
45 ebegin "Stopping all running guests"
46 $_START_VSERVERS -j 1 --all --stop
49 ebegin "Killing all running contexts"
50 $__PKGLIBDIR/bash-wrapper 'kill_contexts'
53 $__PKGLIBDIR/bash-wrapper 'hasCgroup'
55 ebegin "Unmounting cgroup-hierarchy"
56 $__PKGLIBDIR/bash-wrapper 'umount_cgroup'
61 # vim:ts=4:filetype=gentoo-init-d