Changeset 224 for nutchez-0.2/src/shell/install_func.sh
- Timestamp:
- Jun 25, 2010, 2:24:39 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
nutchez-0.2/src/shell/install_func.sh
r219 r224 1 1 #!/bin/bash 2 #source $Work_Path/lang_link3 2 4 3 # shell檔及壓縮檔在同一目錄中 … … 10 9 Index_DB=$User_HOME/search 11 10 Admin_email=nutchuser@nutch 12 Start_PATH=`pwd` 11 # Work_Path=(define on install) 12 Install_Dir=$Work_Path/../ 13 13 MasterIP_Address=`/sbin/ifconfig eth0 | grep 'inet addr' | sed 's/^.*addr://g' | sed 's/Bcast.*$//g' | sed 's/ .*// '` 14 14 net_MacAddr=`/sbin/ifconfig eth0 | grep 'HW' | sed 's/^.*HWaddr //g'` … … 85 85 function unzip_nV2_pack(){ 86 86 local pac_name=nutchez-0.2pack-current.tar.gz 87 local svn_ver=218 88 if [ ! -d "./package" ];then 87 if [ ! -d "$Install_Dir/package" ];then 89 88 mkdir ./package 90 89 fi 91 if [ ! -e " ./package/$pac_name" ];then92 wget "http:// trac.nchc.org.tw/cloud/export/$svn_ver/nutchez-0.2/src/package/$pac_name";90 if [ ! -e "$Install_Dir/package/$pac_name" ];then 91 wget "http://nutchez.googlecode.com/files/$pac_name"; 93 92 if [ $? -eq 0 ];then 94 93 mv $pac_name ./package; … … 99 98 fi 100 99 fi 101 tar -zxvf ./package/$pac_name -C /opt/100 tar -zxvf $Install_Dir/package/$pac_name -C /opt/ 102 101 } 103 102 … … 416 415 417 416 function client_PassMasterIPAddr () { 418 cd $ Start_PATH417 cd $Work_Path 419 418 Line_NO=`cat client_install | grep -n '# Master IP here' | sed 's/:.*//g'` 420 419 debug_info "$MI_client_PassMasterIPAddr_echo_1" … … 430 429 431 430 function client_PassMaster_Hostname () { 432 cd $ Start_PATH431 cd $Work_Path 433 432 Line_NO=`cat client_install | grep -n '# Master Hostname here' | sed 's/:.*//g'` 434 433 debug_info "$MI_client_PassMaster_Hostname_echo_1" … … 443 442 444 443 function client_PassMasterIPAddr_for_Remove () { 445 cd $ Start_PATH444 cd $Work_Path 446 445 Line_NO=`cat client_remove.sh | grep -n "# Master IP here" | sed 's/:.*//g'` 447 446 sed -i ''$((Line_NO+1))'d' client_remove.sh … … 468 467 # 複製檔案至$User_HOME/source目錄下 469 468 mv NutchezForClientOf_$MasterIP_Address.tar.gz /home/nutchuser/nutchez/source 470 cp $Start_PATH/client_install $Start_PATH/client_install_func.sh $Start_PATH/client_remove.sh $Start_PATH/lang_link /home/nutchuser/nutchez/source 471 cp -r $Start_PATH/lang /home/nutchuser/nutchez/source 472 cp -r $Start_PATH/lang /home/nutchuser/nutchez/system 473 cp $Start_PATH/nutchez $Start_PATH/lang_link $Start_PATH/add_hosts $Start_PATH/duplicate_del $Start_PATH/master_remove.sh /home/nutchuser/nutchez/system 474 475 # cp $Start_PATH/client_install $Start_PATH/client_install /home/nutchuser/nutchez/source 476 # cp $Start_PATH/client_install $Start_PATH/client_remove.sh /home/nutchuser/nutchez/source 477 # cp $Start_PATH/client_install $Start_PATH/lang* /home/nutchuser/nutchez/source 469 cp $Work_Path/client_install $Work_Path/client_install_func.sh $Work_Path/client_remove.sh $Work_Path/lang_link /home/nutchuser/nutchez/source 470 cp -r $Work_Path/lang /home/nutchuser/nutchez/source 471 cp -r $Work_Path/lang /home/nutchuser/nutchez/system 472 cp $Work_Path/nutchez $Work_Path/lang_link $Work_Path/add_hosts $Work_Path/duplicate_del $Work_Path/master_remove.sh /home/nutchuser/nutchez/system 473 474 # 複製 nutchez/source 到使用者的安裝資料夾 475 476 mkdir $Install_Dir/Client_DIR 477 cp -rf /home/nutchuser/nutchez/source/* $Install_Dir/Client_DIR/ 478 479 # cp $Work_Path/client_install $Work_Path/client_install /home/nutchuser/nutchez/source 480 # cp $Work_Path/client_install $Work_Path/client_remove.sh /home/nutchuser/nutchez/source 481 # cp $Work_Path/client_install $Work_Path/lang* /home/nutchuser/nutchez/source 478 482 } 479 483
Note: See TracChangeset
for help on using the changeset viewer.