Ignore:
Timestamp:
Jun 10, 2010, 11:52:51 AM (15 years ago)
Author:
rock
Message:

新增功能 1.叢集狀態檢視 2.增加註解文字

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nutchez-0.2/src/test/add_hosts

    r172 r174  
    22# Program:
    33#   Add nutch_nodes to /etc/hosts (for nutchez management interface).
    4 #   $1=/home/nutchuser/nutch_nodes
     4#   $1=/home/nutchuser/nutchez/system/nutch_nodes
    55#   $2=/etc/hosts
    66# Author:
     
    3838done
    3939
    40 # 附加 nutch_nodes 到 /etc/hosts
    41 cp -f /etc/hosts /etc/hosts.bak
    42 cat $1 | grep -v '#' >> $2
     40# Backup /etc/hosts
     41cp -f "$2" "$2.bak"
     42
     43# attache nutch_nodes to hosts
     44sed -i '/# NutchEz add/d' $2
     45echo "# NutchEz add" >>$2
     46cat $1 | grep -v '#' >>$2
     47
Note: See TracChangeset for help on using the changeset viewer.