Ignore:
Timestamp:
Jan 31, 2010, 6:35:39 PM (14 years ago)
Author:
gdb
Message:

Merged invirt-xen-config into hvirt branch

Location:
package_branches/invirt-xen-config/hvirt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • package_branches/invirt-xen-config/hvirt

  • package_branches/invirt-xen-config/hvirt/vif-invirtroute

    r2055 r2971  
    11#!/bin/bash
    2 
    3 
    4 
    5 
    62
    73#============================================================================
     
    2319# ip      list of IP networks for the vif, space-separated (default given in
    2420#         this script).
    25 # V6PREFIX  prefix of v6 address to use
    26 # Note that the v6 support is kind of broken because there's not really a way to populate the v6 prefix
     21#
    2722# This script will set up proxy arp  for any ip addresses that are being routed
    2823# type read to determine if the device is ioemu
     
    4944    offline)
    5045        do_without_error ifdown ${vif}
    51         if [ -f /var/run/radvd/radvd.pid.${vif} ] ; then
    52             do_without_error kill `cat /var/run/radvd/radvd.pid.${vif}`
    53             fi
    5446        ipcmd='del'
    5547        cmdprefix='do_without_error'
     
    5749esac
    5850
    59 v6prefix=${v6prefix:-}
    60 v6prefix=$(xenstore_read_default "$XENBUS_PATH/v6prefix" "$v6prefix")
    6151vif_type=$(xenstore_read_default "$XENBUS_PATH/type" "viffront")
    6252if [  ${vif_type} != "ioemu"  -o  x${qemu_online} = xyes ] ; then
     
    6656        for addr in ${ip} ; do
    6757            ${cmdprefix} ip route ${ipcmd} ${addr} dev ${dev} src ${main_ip}
    68             arpspoof -i $(invirt-getconf xen.network.iface) -t 18.181.0.1 ${addr}&
     58            arpspoof -i $(invirt-getconf xen.iface) -t 18.181.0.1 ${addr}&
    6959            sleep 5
    7060            kill %arpspoof
    7161        done
    7262    fi
    73 
    74     if [ x${v6prefix} != x ] ; then
    75         sed -e "s/@interface@/${dev}/" -e "s+@prefix@+${v6prefix}+" /etc/xen/radvd.conf.template >/var/run/radvd.conf.${vif}
    76         ${cmdprefix} ip -6 addr  ${ipcmd}  fe80::/64 scope link  dev ${dev}
    77         if [ $1 = online ] ; then
    78             radvd  -u radvd -C /var/run/radvd.conf.${vif} -p /var/run/radvd/radvd.pid.${vif}
    79         fi
    80         ${cmdprefix} ip -6 route ${ipcmd} ${v6prefix} dev ${dev}
    81     fi
    8263fi
    83 
    84 handle_iptable
    8564
    8665log debug "Successful vif-route $command for $vif."
Note: See TracChangeset for help on using the changeset viewer.