Changeset 139 for nutchez-0.2/src/test/client_install_func.sh
- Timestamp:
- Jun 1, 2010, 2:04:36 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
nutchez-0.2/src/test/client_install_func.sh
r134 r139 184 184 # 新增nutchuser 帳號時用 Nutchuser_Passwd 當密碼 185 185 function creat_nutchuser_account(){ 186 echo -e "\n= creat_nutchuser_account (debug) =" 186 echo -e "\n= creat_nutchuser_account (debug) =" 187 187 188 188 if [ $(cat /etc/passwd | grep nutchuser) ]; then 189 189 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\" 195 196 expect eof" 196 197 else 197 198 echo "Create nutchuser and change password." 198 199 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\" 204 206 expect eof" 205 207 fi 206 208 } 207 208 209 209 210 # 用scp 複製 master 的設定與安裝資料
Note: See TracChangeset
for help on using the changeset viewer.