ia64/xen-unstable

view tools/domctl/domctl @ 427:f05fccef69dc

bitkeeper revision 1.210 (3eb83c4fHs_yAKLhRwEjFTSk2RBfhA)

xi_list:
new file
dom0_core.c, sched.h, domain.c:
Add default domain name and xi_list to list all running domains
author tlh20@elite.cl.cam.ac.uk
date Tue May 06 22:50:55 2003 +0000 (2003-05-06)
parents 67a66de6d9a0
children 3972b49a8ed2 9d017b39d2bf
line source
1 #!/bin/bash -x
3 if [ -z "$DEFAULTS_FILE" ] ; then DEFAULTS_FILE=domctl.xml ; fi
4 if [ -z "$DEFAULTS_PATH" ] ; then DEFAULTS_PATH=.:/etc ; fi
5 if [ -z "$QUERY_DEV" ] ; then QUERY_DEV=eth0 ; fi
6 if [ -z "$IFCONFIG" ] ; then IFCONFIG=/sbin/ifconfig ; fi
7 if [ -z "$ROUTE" ] ; then ROUTE=/sbin/route ; fi
8 if [ -z "$JAVA" ] ; then JAVA=java ; fi
10 if [ ! -x "$IFCONFIG" ]; then
11 echo Could not find executable $IFCONFIG
12 exit 1
13 fi
15 if [ ! -x "$ROUTE" ]; then
16 echo Could not find executable $ROUTE
17 exit 1
18 fi
20 # Try to determine dom0 network settings to avoid hard-coding
21 # particular machines in the defaults file
22 LOCAL_IP=$(/sbin/ifconfig $QUERY_DEV | grep 'inet addr' | tr ':' '\t' | awk '{print $3}')
23 LOCAL_MASK=$(/sbin/ifconfig $QUERY_DEV | grep 'Mask' | tr ':' '\t' | awk '{print $7}')
24 LOCAL_ROUTE=$(/sbin/route -n | grep $QUERY_DEV | grep 'G' | awk '{print $2}')
27 #ARGS="-DTEST -DDEFAULTS_FILE=$DEFAULTS_FILE -DDEFAULTS_PATH=$DEFAULTS_PATH -DLOCAL_IP=$LOCAL_IP -DLOCAL_MASK=$LOCAL_MASK -DLOCAL_ROUTE=$LOCAL_ROUTE"
28 ARGS="-DDEFAULTS_FILE=$DEFAULTS_FILE -DDEFAULTS_PATH=$DEFAULTS_PATH -DLOCAL_IP=$LOCAL_IP -DLOCAL_MASK=$LOCAL_MASK -DLOCAL_ROUTE=$LOCAL_ROUTE"
31 $JAVA $ARGS -jar domctl.jar $*