Changeset 163 for nutchez-0.2/src/test/install_func.sh
- Timestamp:
- Jun 7, 2010, 6:44:27 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
nutchez-0.2/src/test/install_func.sh
r161 r163 25 25 Index_DB=$User_HOME/search 26 26 Admin_email=nutchuser@nutch 27 28 # $MasterIP_Address 29 # $net_MacAddr 27 Start_PATH=`pwd` 28 MasterIP_Address=`/sbin/ifconfig eth0 | grep 'inet addr' | sed 's/^.*addr://g' | sed 's/Bcast.*$//g' | sed 's/ .*// '` 29 net_MacAddr=`/sbin/ifconfig eth0 | grep 'HW' | sed 's/^.*HWaddr //g'` 30 30 31 31 ######function section section####### … … 73 73 net_address=$(ifconfig $net_interfaces | grep "inet addr:" | sed 's/^.*inet addr://g' | cut -d " " -f1) 74 74 net_MacAddr=$(ifconfig $net_interfaces | grep 'HW' | sed 's/^.*HWaddr //g') 75 echo "net_address is $net_address"76 echo "net_MacAddr is $net_MacAddr"75 #echo "net_address is $net_address" 76 #echo "net_MacAddr is $net_MacAddr" 77 77 78 78 # 若有多個 eth 時 … … 94 94 echo "Your choice is $net_choice" 95 95 net_interface=$(echo $net_interfaces | cut -d " " -f $net_choice) 96 ifconfig $net_interface | grep "inet addr:" | sed 's/^.*inet addr://g' | cut -d " " -f196 #ifconfig $net_interface | grep "inet addr:" | sed 's/^.*inet addr://g' | cut -d " " -f1 97 97 net_address=$(ifconfig $net_interface | grep "inet addr:" | sed 's/^.*inet addr://g' | cut -d " " -f1) 98 98 net_MacAddr=$(ifconfig $net_interfaces | grep 'HW' | sed 's/^.*HWaddr //g') … … 105 105 function show_info () { 106 106 echo "The Master IP Address is $MasterIP_Address" 107 echo "The Master MacAddr is $net_MacAddr" 107 108 } 108 109 … … 179 180 180 181 function client_PassMasterIPAddr () { 182 cd $Start_PATH 181 183 Line_NO=`cat client_install | grep -n '# Master IP here' | sed 's/:.*//g'` 182 184 debug_echo "debug...Master IP here line number = $Line_NO..." … … 187 189 } 188 190 191 189 192 function client_PassMaster_Hostname () { 193 cd $Start_PATH 190 194 Line_NO=`cat client_install | grep -n '# Master Hostname here' | sed 's/:.*//g'` 191 195 debug_echo "debug...Master hostname here line number = $Line_NO..." … … 195 199 debug_echo "edit client_install done..." 196 200 } 201 197 202 198 203 function make_client_install () { … … 210 215 # 複製檔案至$User_HOME/source目錄下 211 216 mv NutchezForClientOf_$Master_IP_Address.tar.gz /home/nutchuser/nutchez/source 212 cp client_installclient_install_func.sh /home/nutchuser/nutchez/source217 cp $Start_PATH/client_install $Start_PATH/client_install_func.sh /home/nutchuser/nutchez/source 213 218 } 214 219 … … 223 228 # client簡易步驟 224 229 function client_install_command () { 225 debug_echo "Client Install Command as Follows:"226 debug_echo "cd ~"227 debug_echo "mkdir nutchez_client_install"228 debug_echo "cd nutchez_client_install"229 debug_echo "scp nutchuser@masterIP:/home/nutchuser/nutchez/source/* ."230 debug_echo "./client_install"231 } 230 echo "Client Install Command as Follows:" 231 echo "cd ~" 232 echo "mkdir nutchez_client_install" 233 echo "cd nutchez_client_install" 234 echo "scp nutchuser@masterIP:/home/nutchuser/nutchez/source/* ." 235 echo "./client_install" 236 }
Note: See TracChangeset
for help on using the changeset viewer.