Changeset 217 for drbl-virt/sbin/drbl_bridge_xen_patch
- Timestamp:
- Oct 19, 2010, 5:13:45 PM (14 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
drbl-virt/sbin/drbl_bridge_xen_patch
r215 r217 1 1 #!/bin/bash 2 2 # Program: 3 # Patch DRBL to bridge eth in booting 3 # Patch DRBL to bridge eth in booting (Xen) 4 4 # Author: 5 5 # Jazz, Rock {jazz, rock}@nchc.org.tw … … 17 17 # = 1. Patch DRBL initrd to support bridge = 18 18 # == Patch /usr/bin/mkpxeinitrd-net (1)Xen network scripts (2)command (3)modules == 19 # backup mkpxeinitrd-net. if already has "drbl-virt add", do nes't sed19 # backup mkpxeinitrd-net. if already has "drbl-virt add", doesn't sed 20 20 cat /usr/bin/mkpxeinitrd-net | grep "# drbl-virt add" >> /dev/null 21 21 if [ $? != 0 ]; then … … 43 43 # drbl-virt add 44 44 NICs=\$(/sbin/ifconfig | grep eth | awk '{print \$1}') 45 declare -i NICs_nu=\$(echo \$NICs |wc - l)45 declare -i NICs_nu=\$(echo \$NICs |wc -w) 46 46 NIC="" 47 47 … … 49 49 for (( i=0 ; i<\$NICs_nu ; i++ )) 50 50 do 51 NIC_IP=\$(ifconfig eth\${i} | grep "inet addr" | sed 's/inet addr://g' | sed 's/Bcast.*$//g' )51 NIC_IP=\$(ifconfig eth\${i} | grep "inet addr" | sed 's/inet addr://g' | sed 's/Bcast.*$//g' | sed 's/^[ ]*//') 52 52 if [ -n \$NIC_IP ]; then 53 53 NIC="eth\${i}"
Note: See TracChangeset
for help on using the changeset viewer.