Changeset 218 for drbl-virt


Ignore:
Timestamp:
Oct 20, 2010, 11:10:46 AM (14 years ago)
Author:
rock
Message:

Milestone: KVM Support (Bridge patch)

Location:
drbl-virt
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • drbl-virt/sbin/drbl_bridge_kvm_patch

    r217 r218  
    2121if [ $? != 0 ]; then
    2222cp /usr/bin/mkpxeinitrd-net /usr/bin/mkpxeinitrd-net.drbl-virt_bak
     23# copy Xen network scripts
     24cp $Work_Home/conf/initrd_bin/network-bridge /usr/lib/mkpxeinitrd-net/initrd-skel/bin/
     25cp $Work_Home/conf/initrd_bin/xen-network-common.sh /usr/lib/mkpxeinitrd-net/initrd-skel/bin/
     26cp $Work_Home/conf/initrd_bin/xen-script-common.sh /usr/lib/mkpxeinitrd-net/initrd-skel/bin/
    2327
    2428# patch it to copy command
     
    3741#!/bin/bash
    3842# drbl-virt add
    39 NICs=$(/sbin/ifconfig | grep eth | awk '{print $1}')
    40 declare -i NICs_nu=$(echo $NICs |wc -w)
     43NICs=\$(/sbin/ifconfig | grep eth | awk '{print \$1}')
     44declare -i NICs_nu=\$(echo \$NICs |wc -w)
    4145 
    42 for NIC in $NICs
     46for NIC in \$NICs
    4347do
    44     NIC_IP=$(ifconfig $NIC | grep "inet addr" | sed 's/inet addr://g' | sed 's/Bcast.*$//g' | sed 's/^[ ]*//')
     48    NIC_IP=\$(ifconfig \$NIC | grep "inet addr" | sed 's/inet addr://g' | sed 's/Bcast.*$//g' | sed 's/^[ ]*//')
    4549
    46     if [ -n $NIC_IP ]; then
     50    if [ -n \$NIC_IP ]; then
    4751        break
    4852    fi
    4953done
    5054
    51 # add bridge and bridge to eth
    52 /bin/brctl addbr br0
    53 /bin/brctl addif br0 \$NIC
    54 /bin/ifconfig \$NIC 0.0.0.0 up
    55 /bin/ifconfig br0 \$NIC_IP up
     55# add bridge to eth
     56bash /bin/network-bridge start netdev=\$NIC
    5657EOF
    5758fi
  • drbl-virt/sbin/drbl_bridge_xen_patch

    r217 r218  
    2222cp /usr/bin/mkpxeinitrd-net /usr/bin/mkpxeinitrd-net.drbl-virt_bak
    2323# copy Xen network scripts
    24 cp /etc/xen/scripts/network-bridge /usr/lib/mkpxeinitrd-net/initrd-skel/bin/
    25 cp /etc/xen/scripts/xen-network-common.sh /usr/lib/mkpxeinitrd-net/initrd-skel/bin/
    26 cp /etc/xen/scripts/xen-script-common.sh /usr/lib/mkpxeinitrd-net/initrd-skel/bin/
     24cp $Work_Home/conf/initrd_bin/network-bridge /usr/lib/mkpxeinitrd-net/initrd-skel/bin/
     25cp $Work_Home/conf/initrd_bin/xen-network-common.sh /usr/lib/mkpxeinitrd-net/initrd-skel/bin/
     26cp $Work_Home/conf/initrd_bin/xen-script-common.sh /usr/lib/mkpxeinitrd-net/initrd-skel/bin/
    2727# patch it to copy command
    2828declare -i modify_line=$(cat -n /usr/bin/mkpxeinitrd-net | grep 'include_bin_prog_from_server=' | awk '{print $1}')
  • drbl-virt/tar_drbl-virt.sh

    r217 r218  
    66# [Main]
    77cd ../
    8 tar zcvf drbl-virt-${version}_$(date +%Y-%m-%d-%H-%M-%S).tar.gz drbl-virt
     8tar zcvf drbl-virt-${version}_$(date +%Y-%m-%d-%H-%M-%S).tar.gz --exclude=.svn  drbl-virt
Note: See TracChangeset for help on using the changeset viewer.