Ignore:
Timestamp:
Jun 4, 2010, 10:49:32 AM (14 years ago)
Author:
shunfa
Message:

新增"將master IP address及hostname寫至slave的hosts"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nutchez-0.2/src/test/install_func.sh

    r150 r152  
    155155}
    156156
     157function client_PassMaster_Hostname () {
     158  Line_NO=`cat client_install | grep -n '# Master Hostname here' | sed 's/:.*//g'`
     159  echo "debug...Master hostname here line number = $Line_NO..."
     160  sed -i ''$((Line_NO+1))'d' client_install
     161  echo "debug...edit Master Hostname at line $((Line_NO+1))..."
     162  sed -i ''$Line_NO'a Master_Hostname='$(hostname)'' client_install
     163  echo "edit client_install done..."
     164}
     165
    157166function make_client_install () {
    158167  # 將Master_IP_Address給client
     
    160169  echo "function make_client_install..."
    161170  client_PassMasterIPAddr
     171  client_PassMaster_Hostname
    162172  su nutchuser -c "tar -cvzf /opt/nutchez/NutchezForClientOf_$Master_IP_Address.tar.gz  /home/nutchuser/nutchez/"
    163173}
Note: See TracChangeset for help on using the changeset viewer.