ia64/xen-unstable

changeset 6158:48da5e506589

merge...
author iap10@freefall.cl.cam.ac.uk
date Sat Aug 13 22:04:22 2005 +0000 (2005-08-13)
parents 323a46d272ff de0127d6e06b
children dc27fd3392b1
files .hgignore linux-2.6-xen-sparse/arch/xen/i386/mm/highmem.c linux-2.6-xen-sparse/arch/xen/i386/mm/hypervisor.c linux-2.6-xen-sparse/arch/xen/i386/mm/pgtable.c linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c linux-2.6-xen-sparse/drivers/xen/blkback/interface.c linux-2.6-xen-sparse/drivers/xen/netback/netback.c linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypercall.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgalloc.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable-3level.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/pgtable.h linux-2.6-xen-sparse/include/linux/highmem.h linux-2.6-xen-sparse/mm/highmem.c tools/examples/network-bridge tools/examples/xend-config.sxp tools/libxc/Makefile tools/libxc/xc_core.c tools/libxc/xc_gnttab.c tools/libxc/xc_linux_build.c tools/libxc/xc_linux_restore.c tools/libxc/xc_linux_save.c tools/libxc/xc_load_elf.c tools/libxc/xc_ptrace.c tools/libxc/xc_vmx_build.c tools/python/xen/xend/XendDomainInfo.py tools/python/xen/xend/server/controller.py tools/xenstore/xenstored_core.c xen/Rules.mk xen/arch/ia64/grant_table.c xen/arch/x86/mm.c xen/arch/x86/setup.c xen/arch/x86/traps.c xen/common/grant_table.c xen/common/perfc.c xen/include/asm-x86/mm.h xen/include/public/grant_table.h xen/include/xen/grant_table.h
line diff
    17.1 --- a/tools/examples/network	Sat Aug 13 21:55:11 2005 +0000
    17.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.3 @@ -1,246 +0,0 @@
    17.4 -#!/bin/sh
    17.5 -#============================================================================
    17.6 -# Default Xen network start/stop script.
    17.7 -# Xend calls a network script when it starts.
    17.8 -# The script name to use is defined in /etc/xen/xend-config.sxp
    17.9 -# in the network-script field.
   17.10 -#
   17.11 -# This script creates a bridge (default xen-br0), adds a device
   17.12 -# (default eth0) to it, copies the IP addresses from the device
   17.13 -# to the bridge and adjusts the routes accordingly.
   17.14 -#
   17.15 -# If all goes well, this should ensure that networking stays up.
   17.16 -# However, some configurations are upset by this, especially
   17.17 -# NFS roots. If the bridged setup does not meet your needs,
   17.18 -# configure a different script, for example using routing instead.
   17.19 -#
   17.20 -# Usage:
   17.21 -#
   17.22 -# network (start|stop|status) {VAR=VAL}*
   17.23 -#
   17.24 -# Vars:
   17.25 -#
   17.26 -# bridge     The bridge to use (default xen-br0).
   17.27 -# netdev     The interface to add to the bridge (default eth0).
   17.28 -# antispoof  Whether to use iptables to prevent spoofing (default yes).
   17.29 -#
   17.30 -# start:
   17.31 -# Creates the bridge and enslaves netdev to it.
   17.32 -# Copies the IP addresses from netdev to the bridge.
   17.33 -# Deletes the routes to netdev and adds them on bridge.
   17.34 -#
   17.35 -# stop:
   17.36 -# Removes netdev from the bridge.
   17.37 -# Deletes the routes to bridge and adds them to netdev.
   17.38 -#
   17.39 -# status:
   17.40 -# Print ifconfig for netdev and bridge.
   17.41 -# Print routes.
   17.42 -#
   17.43 -#============================================================================
   17.44 -
   17.45 -# Exit if anything goes wrong.
   17.46 -set -e 
   17.47 -
   17.48 -# First arg is the operation.
   17.49 -OP=$1
   17.50 -shift
   17.51 -
   17.52 -# Pull variables in args in to environment.
   17.53 -for arg ; do export "${arg}" ; done
   17.54 -
   17.55 -bridge=${bridge:-xen-br0}
   17.56 -netdev=${netdev:-eth0}
   17.57 -antispoof=${antispoof:-yes}
   17.58 -
   17.59 -echo "*network $OP bridge=$bridge netdev=$netdev antispoof=$antispoof" >&2
   17.60 -
   17.61 -# Usage: transfer_addrs src dst
   17.62 -# Copy all IP addresses (including aliases) from device $src to device $dst.
   17.63 -transfer_addrs () {
   17.64 -    local src=$1
   17.65 -    local dst=$2
   17.66 -    # Don't bother if $dst already has IP addresses.
   17.67 -    if ip addr show dev ${dst} | egrep -q '^ *inet ' ; then
   17.68 -        return
   17.69 -    fi
   17.70 -    # Address lines start with 'inet' and have the device in them.
   17.71 -    # Replace 'inet' with 'ip addr add' and change the device name $src
   17.72 -    # to 'dev $src'.
   17.73 -    ip addr show dev ${src} | egrep '^ *inet ' | sed -e "
   17.74 -s/inet/ip addr add/
   17.75 -s@\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+/[0-9]\+\)@\1@
   17.76 -s/${src}/dev ${dst}/
   17.77 -" | sh -e
   17.78 -    # Remove automatic routes on destionation device
   17.79 -    ip route list | sed -ne "
   17.80 -/dev ${dst}\( \|$\)/ {
   17.81 -  s/^/ip route del /
   17.82 -  p
   17.83 -}" | sh -e
   17.84 -}
   17.85 -
   17.86 -# Usage: del_addrs src
   17.87 -del_addrs () {
   17.88 -    local src=$1
   17.89 -    ip addr show dev ${src} | egrep '^ *inet ' | sed -e "
   17.90 -s/inet/ip addr del/
   17.91 -s@\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\)/[0-9]\+@\1@
   17.92 -s/${src}/dev ${src}/
   17.93 -" | sh -e
   17.94 -}
   17.95 -
   17.96 -# Usage: transfer_routes src dst
   17.97 -# Get all IP routes to device $src, delete them, and
   17.98 -# add the same routes to device $dst.
   17.99 -# The original routes have to be deleted, otherwise adding them
  17.100 -# for $dst fails (duplicate routes).
  17.101 -transfer_routes () {
  17.102 -    local src=$1
  17.103 -    local dst=$2
  17.104 -    # List all routes and grep the ones with $src in.
  17.105 -    # Stick 'ip route del' on the front to delete.
  17.106 -    # Change $src to $dst and use 'ip route add' to add.
  17.107 -    ip route list | sed -ne "
  17.108 -/dev ${src}\( \|$\)/ {
  17.109 -  h
  17.110 -  s/^/ip route del /
  17.111 -  P
  17.112 -  g
  17.113 -  s/${src}/${dst}/
  17.114 -  s/^/ip route add /
  17.115 -  P
  17.116 -  d
  17.117 -}" | sh -e
  17.118 -}
  17.119 -
  17.120 -# Usage: create_bridge bridge
  17.121 -create_bridge () {
  17.122 -    local bridge=$1
  17.123 -
  17.124 -    # Don't create the bridge if it already exists.
  17.125 -    if ! brctl show | grep -q ${bridge} ; then
  17.126 -        brctl addbr ${bridge}
  17.127 -        brctl stp ${bridge} off
  17.128 -        brctl setfd ${bridge} 0
  17.129 -    fi
  17.130 -    ifconfig ${bridge} up
  17.131 -}
  17.132 -
  17.133 -# Usage: add_to_bridge bridge dev
  17.134 -add_to_bridge () {
  17.135 -    local bridge=$1
  17.136 -    local dev=$2
  17.137 -    # Don't add $dev to $bridge if it's already on a bridge.
  17.138 -    if ! brctl show | grep -q ${dev} ; then
  17.139 -        brctl addif ${bridge} ${dev}
  17.140 -    fi
  17.141 -}
  17.142 -
  17.143 -# Usage: antispoofing dev bridge
  17.144 -# Set the default forwarding policy for $dev to drop.
  17.145 -# Allow forwarding to the bridge.
  17.146 -antispoofing () {
  17.147 -    local dev=$1
  17.148 -    local bridge=$2
  17.149 -
  17.150 -    iptables -P FORWARD DROP
  17.151 -    iptables -A FORWARD -m physdev --physdev-in ${dev} -j ACCEPT
  17.152 -}
  17.153 -
  17.154 -# Usage: show_status dev bridge
  17.155 -# Print ifconfig and routes.
  17.156 -show_status () {
  17.157 -    local dev=$1
  17.158 -    local bridge=$2
  17.159 -    
  17.160 -    echo '============================================================'
  17.161 -    ifconfig ${dev}
  17.162 -    ifconfig ${bridge}
  17.163 -    echo ' '
  17.164 -    ip route list
  17.165 -    echo ' '
  17.166 -    route -n
  17.167 -    echo '============================================================'
  17.168 -}
  17.169 -
  17.170 -op_start () {
  17.171 -    if [ "${bridge}" == "null" ] ; then
  17.172 -        return
  17.173 -    fi
  17.174 -
  17.175 -    create_bridge ${bridge}
  17.176 -
  17.177 -    if ifconfig 2>/dev/null | grep -q veth0 ; then
  17.178 -        return
  17.179 -    fi
  17.180 -
  17.181 -    if ifconfig veth0 2>/dev/null | grep -q veth0 ; then
  17.182 -        # Propagate MAC address and ARP responsibilities to virtual interface.
  17.183 -        mac=`ifconfig ${netdev} | grep HWadd | sed -e 's/.*\(..:..:..:..:..:..\).*/\1/'`
  17.184 -        ifconfig veth0 down
  17.185 -        ifconfig veth0 hw ether ${mac}
  17.186 -        ifconfig veth0 arp up
  17.187 -        transfer_addrs ${netdev} veth0
  17.188 -        transfer_routes ${netdev} veth0
  17.189 -        del_addrs ${netdev}
  17.190 -        ifconfig ${netdev} -arp down
  17.191 -        ifconfig ${netdev} hw ether fe:ff:ff:ff:ff:ff up
  17.192 -        # Bring up second half of virtual device and attach it to the bridge.
  17.193 -        ifconfig vif0.0 up
  17.194 -        add_to_bridge ${bridge} vif0.0
  17.195 -    else
  17.196 -        transfer_addrs ${netdev} ${bridge}
  17.197 -        transfer_routes ${netdev} ${bridge}
  17.198 -    fi
  17.199 -
  17.200 -    # Attach the real interface to the bridge.
  17.201 -    add_to_bridge ${bridge} ${netdev}
  17.202 -    
  17.203 -    if [ ${antispoof} == 'yes' ] ; then
  17.204 -        antispoofing ${netdev} ${bridge}
  17.205 -    fi
  17.206 -}
  17.207 -
  17.208 -op_stop () {
  17.209 -    if [ "${bridge}" == "null" ] ; then
  17.210 -        return
  17.211 -    fi
  17.212 -
  17.213 -    brctl delif ${bridge} ${netdev}
  17.214 -
  17.215 -    if ifconfig veth0 2>/dev/null | grep -q veth0 ; then
  17.216 -        brctl delif ${bridge} vif0.0
  17.217 -        ifconfig vif0.0 down
  17.218 -        mac=`ifconfig veth0 | grep HWadd | sed -e 's/.*\(..:..:..:..:..:..\).*/\1/'`
  17.219 -        ifconfig ${netdev} down
  17.220 -        ifconfig ${netdev} hw ether ${mac}
  17.221 -        ifconfig ${netdev} arp up
  17.222 -        transfer_addrs veth0 ${netdev}
  17.223 -        transfer_routes veth0 ${netdev}
  17.224 -        del_addrs veth0
  17.225 -        ifconfig veth0 -arp down
  17.226 -        ifconfig veth0 hw ether 00:00:00:00:00:00
  17.227 -    else
  17.228 -        transfer_routes ${bridge} ${netdev}
  17.229 -    fi
  17.230 -}
  17.231 -
  17.232 -case ${OP} in
  17.233 -  start)
  17.234 -        op_start
  17.235 -        ;;
  17.236 -    
  17.237 -    stop)
  17.238 -        op_stop
  17.239 -        ;;
  17.240 -
  17.241 -    status)
  17.242 -        show_status ${netdev} ${bridge}
  17.243 -       ;;
  17.244 -
  17.245 -    *)
  17.246 -       echo 'Unknown command: ' ${OP} >&2
  17.247 -       echo 'Valid commands are: start, stop, status' >&2
  17.248 -       exit 1
  17.249 -esac
    18.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.2 +++ b/tools/examples/network-bridge	Sat Aug 13 22:04:22 2005 +0000
    18.3 @@ -0,0 +1,260 @@
    18.4 +#!/bin/sh -x
    18.5 +#============================================================================
    18.6 +# Default Xen network start/stop script.
    18.7 +# Xend calls a network script when it starts.
    18.8 +# The script name to use is defined in /etc/xen/xend-config.sxp
    18.9 +# in the network-script field.
   18.10 +#
   18.11 +# This script creates a bridge (default xen-br0), adds a device
   18.12 +# (default eth0) to it, copies the IP addresses from the device
   18.13 +# to the bridge and adjusts the routes accordingly.
   18.14 +#
   18.15 +# If all goes well, this should ensure that networking stays up.
   18.16 +# However, some configurations are upset by this, especially
   18.17 +# NFS roots. If the bridged setup does not meet your needs,
   18.18 +# configure a different script, for example using routing instead.
   18.19 +#
   18.20 +# Usage:
   18.21 +#
   18.22 +# network (start|stop|status) {VAR=VAL}*
   18.23 +#
   18.24 +# Vars:
   18.25 +#
   18.26 +# bridge     The bridge to use (default xen-br0).
   18.27 +# netdev     The interface to add to the bridge (default eth0).
   18.28 +# antispoof  Whether to use iptables to prevent spoofing (default yes).
   18.29 +#
   18.30 +# start:
   18.31 +# Creates the bridge and enslaves netdev to it.
   18.32 +# Copies the IP addresses from netdev to the bridge.
   18.33 +# Deletes the routes to netdev and adds them on bridge.
   18.34 +#
   18.35 +# stop:
   18.36 +# Removes netdev from the bridge.
   18.37 +# Deletes the routes to bridge and adds them to netdev.
   18.38 +#
   18.39 +# status:
   18.40 +# Print ifconfig for netdev and bridge.
   18.41 +# Print routes.
   18.42 +#
   18.43 +#============================================================================
   18.44 +
   18.45 +# Exit if anything goes wrong.
   18.46 +set -e 
   18.47 +
   18.48 +# First arg is the operation.
   18.49 +OP=$1
   18.50 +shift
   18.51 +
   18.52 +# Pull variables in args in to environment.
   18.53 +for arg ; do export "${arg}" ; done
   18.54 +
   18.55 +bridge=${bridge:-xen-br0}
   18.56 +netdev=${netdev:-eth0}
   18.57 +antispoof=${antispoof:-yes}
   18.58 +
   18.59 +echo "*network $OP bridge=$bridge netdev=$netdev antispoof=$antispoof" >&2
   18.60 +
   18.61 +# Usage: transfer_addrs src dst
   18.62 +# Copy all IP addresses (including aliases) from device $src to device $dst.
   18.63 +transfer_addrs () {
   18.64 +    local src=$1
   18.65 +    local dst=$2
   18.66 +    # Don't bother if $dst already has IP addresses.
   18.67 +    if ip addr show dev ${dst} | egrep -q '^ *inet ' ; then
   18.68 +        return
   18.69 +    fi
   18.70 +    # Address lines start with 'inet' and have the device in them.
   18.71 +    # Replace 'inet' with 'ip addr add' and change the device name $src
   18.72 +    # to 'dev $src'.
   18.73 +    ip addr show dev ${src} | egrep '^ *inet ' | sed -e "
   18.74 +s/inet/ip addr add/
   18.75 +s@\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+/[0-9]\+\)@\1@
   18.76 +s/${src}/dev ${dst}/
   18.77 +" | sh -e
   18.78 +    # Remove automatic routes on destionation device
   18.79 +    ip route list | sed -ne "
   18.80 +/dev ${dst}\( \|$\)/ {
   18.81 +  s/^/ip route del /
   18.82 +  p
   18.83 +}" | sh -e
   18.84 +}
   18.85 +
   18.86 +# Usage: del_addrs src
   18.87 +del_addrs () {
   18.88 +    local src=$1
   18.89 +    ip addr show dev ${src} | egrep '^ *inet ' | sed -e "
   18.90 +s/inet/ip addr del/
   18.91 +s@\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\)/[0-9]\+@\1@
   18.92 +s/${src}/dev ${src}/
   18.93 +" | sh -e
   18.94 +}
   18.95 +
   18.96 +# Usage: transfer_routes src dst
   18.97 +# Get all IP routes to device $src, delete them, and
   18.98 +# add the same routes to device $dst.
   18.99 +# The original routes have to be deleted, otherwise adding them
  18.100 +# for $dst fails (duplicate routes).
  18.101 +transfer_routes () {
  18.102 +    local src=$1
  18.103 +    local dst=$2
  18.104 +    # List all routes and grep the ones with $src in.
  18.105 +    # Stick 'ip route del' on the front to delete.
  18.106 +    # Change $src to $dst and use 'ip route add' to add.
  18.107 +    ip route list | sed -ne "
  18.108 +/dev ${src}\( \|$\)/ {
  18.109 +  h
  18.110 +  s/^/ip route del /
  18.111 +  P
  18.112 +  g
  18.113 +  s/${src}/${dst}/
  18.114 +  s/^/ip route add /
  18.115 +  P
  18.116 +  d
  18.117 +}" | sh -e
  18.118 +}
  18.119 +
  18.120 +# Usage: create_bridge bridge
  18.121 +create_bridge () {
  18.122 +    local bridge=$1
  18.123 +
  18.124 +    # Don't create the bridge if it already exists.
  18.125 +    if ! brctl show | grep -q ${bridge} ; then
  18.126 +        brctl addbr ${bridge}
  18.127 +        brctl stp ${bridge} off
  18.128 +        brctl setfd ${bridge} 0
  18.129 +    fi
  18.130 +    ifconfig ${bridge} up
  18.131 +}
  18.132 +
  18.133 +# Usage: add_to_bridge bridge dev
  18.134 +add_to_bridge () {
  18.135 +    local bridge=$1
  18.136 +    local dev=$2
  18.137 +    # Don't add $dev to $bridge if it's already on a bridge.
  18.138 +    if ! brctl show | grep -q ${dev} ; then
  18.139 +        brctl addif ${bridge} ${dev}
  18.140 +    fi
  18.141 +}
  18.142 +
  18.143 +# Usage: antispoofing dev bridge
  18.144 +# Set the default forwarding policy for $dev to drop.
  18.145 +# Allow forwarding to the bridge.
  18.146 +antispoofing () {
  18.147 +    local dev=$1
  18.148 +    local bridge=$2
  18.149 +
  18.150 +    iptables -P FORWARD DROP
  18.151 +    iptables -A FORWARD -m physdev --physdev-in ${dev} -j ACCEPT
  18.152 +}
  18.153 +
  18.154 +# Usage: show_status dev bridge
  18.155 +# Print ifconfig and routes.
  18.156 +show_status () {
  18.157 +    local dev=$1
  18.158 +    local bridge=$2
  18.159 +    
  18.160 +    echo '============================================================'
  18.161 +    ifconfig ${dev}
  18.162 +    ifconfig ${bridge}
  18.163 +    echo ' '
  18.164 +    ip route list
  18.165 +    echo ' '
  18.166 +    route -n
  18.167 +    echo '============================================================'
  18.168 +}
  18.169 +
  18.170 +op_start () {
  18.171 +    if [ "${bridge}" == "null" ] ; then
  18.172 +        return
  18.173 +    fi
  18.174 +
  18.175 +    create_bridge ${bridge}
  18.176 +
  18.177 +    if ifconfig 2>/dev/null | grep -q veth0 ; then
  18.178 +        return
  18.179 +    fi
  18.180 +
  18.181 +    if ifconfig veth0 2>/dev/null | grep -q veth0 ; then
  18.182 +	mac=`ifconfig ${netdev} | grep HWadd | sed -e 's/.*\(..:..:..:..:..:..\).*/\1/'`
  18.183 +	if ! ifdown ${netdev} ; then
  18.184 +		# if ifup didn't work, see if we have an ip= on cmd line
  18.185 +		if egrep 'ip=[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+:' /proc/cmdline ; 
  18.186 +		then
  18.187 +                        kip=`sed -e 's!.*ip=\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\):.*!\1!' /proc/cmdline`
  18.188 +                        kmask=`sed -e 's!.*ip=[^:]*:[^:]*:[^:]*:\([^:]*\):.*!\1!' /proc/cmdline` 
  18.189 +                        kgate=`sed -e 's!.*ip=[^:]*:[^:]*:\([^:]*\):.*!\1!' /proc/cmdline`
  18.190 +			ifconfig ${netdev} 0.0.0.0 down
  18.191 +		fi
  18.192 +	fi
  18.193 +	ip link set ${netdev} name p${netdev}
  18.194 +	ip link set veth0 name eth0
  18.195 +	ifconfig p${netdev} -arp down
  18.196 +	ifconfig p${netdev} hw ether fe:ff:ff:ff:ff:ff
  18.197 +	ifconfig ${netdev} hw ether ${mac}
  18.198 +	add_to_bridge ${bridge} vif0.0
  18.199 +	add_to_bridge ${bridge} p${netdev}
  18.200 +	ip link set vif0.0 up
  18.201 +	ip link set p${netdev} up
  18.202 +	if ! ifup ${netdev} ; then
  18.203 +		if [ ${kip} ] ; then
  18.204 +			# use the addresses we grocked from /proc/cmdline	
  18.205 +			ifconfig ${netdev} ${kip} 
  18.206 +			[ ${kmask} ] && ifconfig ${netdev} netmask ${kmask} 
  18.207 +			ifconfig ${netdev} up
  18.208 +			[ ${kgate} ] && ip route add default via ${kgate}	
  18.209 +		fi
  18.210 +        fi
  18.211 +    else
  18.212 +	# old style without veth0
  18.213 +	transfer_addrs ${netdev} ${bridge}
  18.214 +        transfer_routes ${netdev} ${bridge}
  18.215 +    fi
  18.216 +    
  18.217 +    if [ ${antispoof} == 'yes' ] ; then
  18.218 +        antispoofing ${netdev} ${bridge}
  18.219 +    fi
  18.220 +}
  18.221 +
  18.222 +op_stop () {
  18.223 +    if [ "${bridge}" == "null" ] ; then
  18.224 +        return
  18.225 +    fi
  18.226 +
  18.227 +    brctl delif ${bridge} ${netdev}
  18.228 +
  18.229 +    if ifconfig veth0 2>/dev/null | grep -q veth0 ; then
  18.230 +        brctl delif ${bridge} vif0.0
  18.231 +        ifconfig vif0.0 down
  18.232 +        mac=`ifconfig veth0 | grep HWadd | sed -e 's/.*\(..:..:..:..:..:..\).*/\1/'`
  18.233 +        ifconfig ${netdev} down
  18.234 +        ifconfig ${netdev} hw ether ${mac}
  18.235 +        ifconfig ${netdev} arp up
  18.236 +        transfer_addrs veth0 ${netdev}
  18.237 +        transfer_routes veth0 ${netdev}
  18.238 +        del_addrs veth0
  18.239 +        ifconfig veth0 -arp down
  18.240 +        ifconfig veth0 hw ether 00:00:00:00:00:00
  18.241 +    else
  18.242 +        transfer_routes ${bridge} ${netdev}
  18.243 +    fi
  18.244 +}
  18.245 +
  18.246 +case ${OP} in
  18.247 +  start)
  18.248 +        op_start
  18.249 +        ;;
  18.250 +    
  18.251 +    stop)
  18.252 +        op_stop
  18.253 +        ;;
  18.254 +
  18.255 +    status)
  18.256 +        show_status ${netdev} ${bridge}
  18.257 +       ;;
  18.258 +
  18.259 +    *)
  18.260 +       echo 'Unknown command: ' ${OP} >&2
  18.261 +       echo 'Valid commands are: start, stop, status' >&2
  18.262 +       exit 1
  18.263 +esac
    19.1 --- a/tools/examples/xend-config.sxp	Sat Aug 13 21:55:11 2005 +0000
    19.2 +++ b/tools/examples/xend-config.sxp	Sat Aug 13 22:04:22 2005 +0000
    19.3 @@ -28,7 +28,7 @@
    19.4  
    19.5  ## Use the following if VIF traffic is bridged.
    19.6  # The script used to start/stop networking for xend.
    19.7 -(network-script    network)
    19.8 +(network-script    network-bridge)
    19.9  # The default bridge that virtual interfaces should be connected to.
   19.10  (vif-bridge        xen-br0)
   19.11  # The default script used to control virtual interfaces.