Changeset 176 for drbl-virt/sbin
- Timestamp:
- Aug 11, 2010, 2:27:12 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
drbl-virt/sbin/drbl_xen_patch.sh
r175 r176 80 80 cat <<EOF >/usr/lib/mkpxeinitrd-net/initrd-skel/bin/start_xen_bridge.sh 81 81 # drbl-virt add 82 NICs= $(/sbin/ifconfig | grep eth | awk '{print$1}')83 declare -i NICs_nu= $(echo$NICs |wc -l)82 NICs=\$(/sbin/ifconfig | grep eth | awk '{print \$1}') 83 declare -i NICs_nu=\$(echo \$NICs |wc -l) 84 84 NIC="" 85 85 86 if [ $NICs_nu -lt 1 ];87 for (( i=0 ; i< $NICs_nu ; i++ ))86 if [ \$NICs_nu -lt 1 ]; 87 for (( i=0 ; i<\$NICs_nu ; i++ )) 88 88 do 89 NIC_IP= $(ifconfig eth${i} | grep "inet addr" | sed 's/inet addr://g' | sed 's/Bcast.*$//g')90 if [ -n $NIC_IP ]; then91 NIC="eth ${i}"89 NIC_IP=\$(ifconfig eth\${i} | grep "inet addr" | sed 's/inet addr://g' | sed 's/Bcast.*$//g') 90 if [ -n \$NIC_IP ]; then 91 NIC="eth\${i}" 92 92 break 93 93 fi 94 94 done 95 95 else 96 NIC= $NICS96 NIC=\$NICS 97 97 fi 98 98 99 sh /bin/network-bridge start netdev= $NIC99 sh /bin/network-bridge start netdev=\$NIC 100 100 EOF 101 101 # backup
Note: See TracChangeset
for help on using the changeset viewer.