All pastes #62286 Raw Edit

/etc/init.d/xendExtraBridges

public shellscript v1 · immutable
#62286 ·published 2006-06-05 21:30 UTC
rendered paste body
#!/sbin/runscript# Copyright 1999-2005 Gentoo Foundation# Distributed under the terms of the GNU General Public License v2# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen/files/xend-init,v 1.3 2005/10/08 12:32:33 chrb Exp $opts="start stop status restart"doForEach() {	local RETVAL=0 IMRETVAL=0	local OIFS="$IFS"	local LINE	IFS=''	for LINE in $(</etc/conf.d/xendExtraBridges) ; do		IFS=' 	'		$* $LINE || IMRETVAL=$?		if [ "$IMRETVAL" -ne 0 ] ; then			RETVAL=$IMRETVAL; IMRETVAL=0;		fi		IFS=''	done	IFS="$OIFS"	return $RETVAL}checkconfig() {	if [ ! -e /etc/conf.d/xendExtraBridges ] ; then		eerror "You need a /etc/conf.d/xendExtraBridges file listing parameters additional bridges"		return 1	fi}depend() {	need xend net	before xendomain sshd ntpd nfs nfsmount rsyncd portmap}start() {	checkconfig || return 1	ebegin "Starting Xen additional bridge(s)"	doForEach /etc/xen/scripts/network-bridge start	eend $?}stop() {	checkconfig || return 1	ebegin "Stopping all additional bridges"	doForEach /etc/xen/scripts/network-bridge stop	eend 0}status() {	doForEach /etc/xen/scripts/network-bridge status}