Changeset 185 for drbl-virt/sbin/functions_drbl_virt
- Timestamp:
- Aug 26, 2010, 3:19:26 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
drbl-virt/sbin/functions_drbl_virt
r184 r185 70 70 } 71 71 72 73 # [Create drbl-virt path]74 function install_drbl-virt_dir(){75 mkdir -p $Work_Home/.tmp76 mkdir -p $Work_Home/etc77 }78 79 80 72 # [Check Hypervisior] 81 73 function check_hypervisior(){ … … 219 211 #echo "VM_IP_range=$VM_IP_range" 220 212 } 213 221 214 222 215 #function get_VM_prefix_name(){ … … 317 310 } 318 311 319 function add_VM_dhcpd_conf(){ 320 # backup dhcpd.conf 321 if [ -e /etc/dhcp3/dhcpd.conf ]; then 322 cp -f /etc/dhcp3/dhcpd.conf /etc/dhcp3/dhcpd.conf.drbl-virt_bak 323 fi 324 325 subnet_lines=$(cat -n /etc/dhcp3/dhcpd.conf | grep $eth_network | awk '{print $1}') 326 host_lines=$(cat -n /etc/dhcp3/dhcpd.conf | grep 'host ' | grep '{' | awk '{print $1}') 327 328 for subnet_line in $subnet_lines 329 do 330 host_lines cat -n /etc/dhcp3/dhcpd.conf | sed -n "$subnet_line,\$p" | grep 'host .* {' | awk '{print $1}' 331 332 done 333 334 } 312 #function add_VM_dhcpd_conf(){ 313 ## backup dhcpd.conf 314 #if [ -e /etc/dhcp3/dhcpd.conf ]; then 315 #cp -f /etc/dhcp3/dhcpd.conf /etc/dhcp3/dhcpd.conf.drbl-virt_bak 316 #fi 317 #subnet_lines=$(cat -n /etc/dhcp3/dhcpd.conf | grep $eth_network | awk '{print $1}') 318 #host_lines=$(cat -n /etc/dhcp3/dhcpd.conf | grep 'host ' | grep '{' | awk '{print $1}') 319 # 320 #for subnet_line in $subnet_lines 321 #do 322 # host_lines cat -n /etc/dhcp3/dhcpd.conf | sed -n "$subnet_line,\$p" | grep 'host .* {' | awk '{print $1}' 323 #done 324 #}
Note: See TracChangeset
for help on using the changeset viewer.