Ignore:
Timestamp:
Jun 1, 2010, 2:04:36 PM (14 years ago)
Author:
shunfa
Message:

修改install, install_func.sh, client_install_func.sh(新增帳號timeout部份)

File:
1 edited

Legend:

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

    r134 r139  
    184184# 新增nutchuser 帳號時用 Nutchuser_Passwd 當密碼
    185185function creat_nutchuser_account(){
    186 echo -e "\n= creat_nutchuser_account (debug) ="                             
     186echo -e "\n= creat_nutchuser_account (debug) ="
    187187
    188188if [ $(cat /etc/passwd | grep nutchuser) ]; then
    189189    echo "System already has nutchuser, change nutchuser password."
    190     expect -c "spawn passwd nutchuser                 
    191     expect \"*: \"                         
    192     send \"$1\r\"                         
    193     expect \"*: \"                         
    194     send \"$1\r\"                         
     190    expect -c "spawn passwd nutchuser
     191    set timeout 1
     192    expect \"*: \"
     193    send \"$1\r\"
     194    expect \"*: \"
     195    send \"$1\r\"
    195196    expect eof"
    196197else
    197198    echo "Create nutchuser and change password."
    198199    useradd -m nutchuser -s /bin/bash
    199     expect -c "spawn passwd nutchuser                 
    200     expect \"*: \"
    201     send \"$1\r\"
    202     expect \"*: \"
    203     send \"$1\r\"
     200    expect -c "spawn passwd nutchuser
     201    set timeout 1
     202    expect \"*: \"
     203    send \"$1\r\"
     204    expect \"*: \"
     205    send \"$1\r\"
    204206    expect eof"
    205207fi
    206208}
    207 
    208209
    209210# 用scp 複製 master 的設定與安裝資料
Note: See TracChangeset for help on using the changeset viewer.