Changeset 192 for drbl-virt/sbin
- Timestamp:
- Aug 27, 2010, 6:28:55 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
drbl-virt/sbin/drbl_PXE_PV-VM_create.sh
r191 r192 33 33 echo "-h deploy vm to which host" 34 34 echo "Examples: " 35 echo "drbl_PXE_PV-VM_create.sh options -v drbl110 -c 2 -r am512 -h drbl101"35 echo "drbl_PXE_PV-VM_create.sh options -v drbl110 -c 2 -r 512 -h drbl101" 36 36 } 37 37 … … 41 41 # = 1. Parse parameters = 42 42 if [ $# -eq 0 ]; then 43 Usage 43 Usage && exit 44 44 fi 45 45 … … 114 114 for IP_VM_file in $IP_VM_files 115 115 do 116 IP_VM_line=$(cat -n $ IP_VM_file | grep "$vm_name" | awk '{print $1}')116 IP_VM_line=$(cat -n $Work_Home/etc/$IP_VM_file | grep "$vm_name" | awk '{print $1}') 117 117 if [ -n $IP_VM_line ]; then 118 118 IP_VM_right_file=$IP_VM_file … … 131 131 # start get mac address 132 132 IP_VM_eth=$(echo $IP_VM_right_file | sed 's/IP_VM_//g' ) 133 vm_mac=$(cat $Work_Home/etc/macadr-VM-${IP_VM_eth}.txt | sed -n "${IP_VM_right_line} ")133 vm_mac=$(cat $Work_Home/etc/macadr-VM-${IP_VM_eth}.txt | sed -n "${IP_VM_right_line}p") 134 134 135 135 # = 3. Generate PXE PV-VM configuration = … … 139 139 140 140 vm_cfg=${home_dir}/${vm_name}.cfg 141 142 if [ -e $vm_cfg ]; then 141 143 rm $vm_cfg 144 fi 142 145 143 146 # start to generate
Note: See TracChangeset
for help on using the changeset viewer.