Changeset 176


Ignore:
Timestamp:
Aug 11, 2010, 2:27:12 PM (14 years ago)
Author:
rock
Message:

BugFix?: insert \ to variables

File:
1 edited

Legend:

Unmodified
Added
Removed
  • drbl-virt/sbin/drbl_xen_patch.sh

    r175 r176  
    8080cat <<EOF >/usr/lib/mkpxeinitrd-net/initrd-skel/bin/start_xen_bridge.sh
    8181# drbl-virt add
    82 NICs=$(/sbin/ifconfig | grep eth | awk '{print $1}')
    83 declare -i NICs_nu=$(echo $NICs |wc -l)
     82NICs=\$(/sbin/ifconfig | grep eth | awk '{print \$1}')
     83declare -i NICs_nu=\$(echo \$NICs |wc -l)
    8484NIC=""
    8585
    86 if [ $NICs_nu -lt 1  ];
    87     for (( i=0 ; i<$NICs_nu ; i++ ))
     86if [ \$NICs_nu -lt 1  ];
     87    for (( i=0 ; i<\$NICs_nu ; i++ ))
    8888    do
    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}"
     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}"
    9292            break
    9393        fi
    9494    done
    9595else
    96     NIC=$NICS
     96    NIC=\$NICS
    9797fi
    9898
    99 sh /bin/network-bridge start netdev=$NIC
     99sh /bin/network-bridge start netdev=\$NIC
    100100EOF
    101101# backup
Note: See TracChangeset for help on using the changeset viewer.