Changeset 178 for drbl-virt/sbin/functions_drbl_virt
- Timestamp:
- Aug 13, 2010, 3:37:28 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
drbl-virt/sbin/functions_drbl_virt
r172 r178 142 142 done 143 143 144 #echo "debug: Xen_Kernel=$Xen_Kernel" 145 } 144 146 145 #echo "debug: Xen_Kernel=$Xen_Kernel" 147 148 function get_Host_IP_range(){ 149 cat /etc/drbl/IP_HOST_TABLE | sed "${Host_first_Line}p" 150 cat /etc/drbl/IP_HOST_TABLE | sed "${Host_final_Line}p" 151 declare -i Host_first_Line=$(cat -n /etc/drbl/IP_HOST_TABLE | grep "# Created by DRBL (drblpush), begin" | awk '{print $1}') 152 Host_first_Line=$((${Host_first_Line}+1)) 153 154 declare -i Host_final_Line=$(cat -n /etc/drbl/IP_HOST_TABLE | grep "# Created by DRBL (drblpush), end" | awk '{print $1}') 155 Host_final_Line=$((${Host_final_Line}-1)) 156 #echo "$Host_first_Line" 157 #echo "$Host_final_Line" 158 159 Host_first_IP=$(cat /etc/drbl/IP_HOST_TABLE | sed -n "${Host_first_Line}p"| awk '{print $1}') 160 Host_final_IP=$(cat /etc/drbl/IP_HOST_TABLE | sed -n "${Host_final_Line}p"| awk '{print $1}') 161 #echo $Host_first_IP 162 #echo $Host_final_IP 163 } 164 165 function get_VM_IP_range(){ 166 echo "" 167 echo "Your drbl client IP range $Host_first_IP ~ $Host_final_IP" 168 declare -i Host_final_IP_4=$(echo $Host_final_IP | cut -d "." -f4) 169 Host_final_IP_4=$(($Host_final_IP_4+1)) 170 VM_first_IP=$(echo $Host_final_IP | cut -d "." -f 1-3) 171 VM_first_IP="${VM_first_IP}.${Host_final_IP_4}" 172 echo "The VM IP Range will start from $VM_first_IP" 173 while [ $jude != "yes" -a $jude != "y" ]; 174 do 175 read "Input your IP range for VM: " VM_IP_range 176 done 177 echo "VM_first_IP=$VM_first_IP" > $Work_Home/.tmp/IP_VM_TABLE 178 echo "VM_IP_range=$VM_IP_range" >> $Work_Home/.tmp/IP_VM_TABLE 179 146 180 } 147 181
Note: See TracChangeset
for help on using the changeset viewer.