diff options
author | Alexey Shvetsov <alexxy@gentoo.org> | 2011-11-28 19:41:25 +0400 |
---|---|---|
committer | Alexey Shvetsov <alexxy@gentoo.org> | 2011-11-28 19:41:25 +0400 |
commit | 91eeab213a1a18e7c7e1470ebf0647504409fe72 (patch) | |
tree | b8f3c358db9d9006afcd211cda1b1cb450b3bf28 /app-emulation/xen-tools/files/xendomains.initd-r1 | |
parent | "EAPI4 tp xen-tools [4.1.2 -9999]" (diff) | |
download | virtualization-91eeab213a1a18e7c7e1470ebf0647504409fe72.tar.gz virtualization-91eeab213a1a18e7c7e1470ebf0647504409fe72.tar.bz2 virtualization-91eeab213a1a18e7c7e1470ebf0647504409fe72.zip |
Revork ebuilds
(Portage version: 2.2.0_alpha78/git/Linux x86_64, unsigned Manifest commit)
Diffstat (limited to 'app-emulation/xen-tools/files/xendomains.initd-r1')
-rwxr-xr-x | app-emulation/xen-tools/files/xendomains.initd-r1 | 117 |
1 files changed, 0 insertions, 117 deletions
diff --git a/app-emulation/xen-tools/files/xendomains.initd-r1 b/app-emulation/xen-tools/files/xendomains.initd-r1 deleted file mode 100755 index c7f6f88..0000000 --- a/app-emulation/xen-tools/files/xendomains.initd-r1 +++ /dev/null @@ -1,117 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xendomains.initd-r1,v 1.2 2011/10/13 19:30:37 alexxy Exp $ - -opts="start stop status restart" - -depend() { - need xend - after dhcp -} - -get_domname() { - local name_from_file=$(sed -rn 's/^name\W*=\W*\"?([[:alnum:]_\.-]+)\"?\W*;?/\1/p' "${1}" | tail -n 1) - - if [[ -z ${name_from_file} ]] ; then - basename "${1}" - else - echo ${name_from_file} - fi -} - -is_running() { - /usr/sbin/xm list "${1}" >/dev/null 2>&1 -} - -using_screen() { - [[ "${SCREEN}" == "yes" || "${SCREEN}" == "YES" ]] -} - -set_screen_cmd() { - screen_cmd="screen -c ${SCREENRC:-/dev/null} -q -r ${SCREEN_NAME:=xen} -X" -} - -start() { - set_screen_cmd - - einfo "Starting Xen domains from ${AUTODIR:=/etc/xen/auto}" - if using_screen ; then - ebegin "Creating screen session to hold domain consoles" - ( screen -c ${SCREENRC:-/dev/null} -d -m -S ${SCREEN_NAME} -t dom0 && sleep 3 \ - && ${screen_cmd} zombie dr \ - && logrotate -f /etc/xen/xen-consoles.logrotate \ - && ${screen_cmd} logfile /var/log/xen-consoles/%t.log \ - && ${screen_cmd} logfile flush ${SCREEN_LOG_INTERVAL:-1} \ - && ${screen_cmd} log on \ - && ${screen_cmd} deflog on ) >/dev/null - if [[ $? -ne 0 ]] ; then - eend 1 - return 1 - else - eend - fi - fi - # Create all domains with config files in AUTODIR. - for dom in $(ls "${AUTODIR:=/etc/xen/auto}/"* 2>/dev/null | sort); do - name=$(get_domname ${dom}) - if ! is_running ${name} ; then - ebegin " Starting domain ${name}" - if using_screen ; then - ${screen_cmd} screen -t ${name} xm create ${dom} -c - else - xm create --quiet ${dom} - fi - eend $? - else - einfo " Not starting domain ${name} - already running" - fi - done -} - -stop() { - set_screen_cmd - - einfo "Shutting down Xen domains from ${AUTODIR:=/etc/xen/auto}" - # Stop all domains with config files in AUTODIR. - DOMAINS="$(ls "${AUTODIR:=/etc/xen/auto}/"* 2>/dev/null | sort -r)" - - if [[ "$PARALLEL_SHUTDOWN" = "yes" ]] ; then - for dom in $DOMAINS ; do - name=$(get_domname ${dom}) - if is_running ${name} ; then - ebegin " Asking domain ${name} to shutdown in the background..." - xm shutdown --wait ${name} >/dev/null & - else - einfo " Not stopping domain ${name} - not running" - fi - done - einfo " Waiting for shutdown of domains that are still running" - wait - eend $? - else - for dom in $DOMAINS ; do - name=$(get_domname ${dom}) - if is_running ${name} ; then - ebegin " Waiting for domain ${name} to shutdown" - xm shutdown --wait ${name} >/dev/null - eend $? - else - einfo " Not stopping domain ${name} - not running" - fi - done - fi - if using_screen ; then - if ${screen_cmd} sleep 0 >/dev/null 2>&1 ; then - ebegin "Closing screen session ${SCREEN_NAME}" - ${screen_cmd} quit - eend $? - else - eend 0 - fi - fi -} - -status() { - /usr/sbin/xm list -} |