Changeset 150 for nutchez-0.2
- Timestamp:
- Jun 3, 2010, 5:17:27 PM (14 years ago)
- Location:
- nutchez-0.2/src/test
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
nutchez-0.2/src/test/install
r146 r150 6 6 source ./client_install_func.sh 7 7 ### real code ##### 8 9 # 前置作業 10 # *.sh及nutchez-0.2-0531.tar.gz均在同一目錄下 8 11 9 12 # 執行環境檢查 -
nutchez-0.2/src/test/install_func.sh
r144 r150 26 26 set_nutchuser_passwd 27 27 read -p "Please enter Administrator's e-mail address: " Admin_email 28 read -p "Please enter the Master DNS: " MasterDNS 28 select_eth 29 MasterIP_Address=$net_address 30 # read -p "Please enter the Master DNS: " MasterDNS 29 31 } 30 32 … … 37 39 } 38 40 41 42 function select_eth () { 43 net_interfaces=$(ifconfig | grep ^eth | cut -d " " -f1) 44 net_nu=$(echo $net_interfaces | wc -w) 45 46 # 若只有一個 eth 時 47 if [ "$net_nu" == "1" ]; then 48 ifconfig $net_interfaces | grep "inet addr:" | sed 's/^.*inet addr://g' | cut -d " " -f1 49 net_address=$(ifconfig $net_interfaces | grep "inet addr:" | sed 's/^.*inet addr://g' | cut -d " " -f1) 50 # echo "net_address is $net_address" 51 52 # 若有多個 eth 時 53 else 54 declare -i i=1 55 echo -e "\nSystem have multiple network device, which network use for this machine: " 56 57 for net in $net_interfaces 58 do 59 echo "($i) $net $(ifconfig $net | grep "inet addr:" | sed 's/^.*inet addr://g' | cut -d " " -f1)" 60 i=i+1 61 done 62 63 read -p "Plz choice(1/2/3...): " net_choice 64 if [ -z $net_choice ]; then 65 net_choice=1 66 fi 67 68 echo "Your choice is $net_choice" 69 net_interface=$(echo $net_interfaces | cut -d " " -f $net_choice) 70 ifconfig $net_interface | grep "inet addr:" | sed 's/^.*inet addr://g' | cut -d " " -f1 71 net_address=$(ifconfig $net_interface | grep "inet addr:" | sed 's/^.*inet addr://g' | cut -d " " -f1) 72 echo "net_address is $net_address" 73 fi 74 } 75 76 39 77 function show_info () { 40 78 echo "Administrator's e-mail address is $Admin_email." 41 echo "The master DNSis: $MasterDNS"79 echo "The Master IP Address is: $MasterDNS" 42 80 } 43 81 … … 132 170 } 133 171 172 # client簡易步驟 134 173 function client_install_command () { 135 WhereAmI=pwd136 174 echo "Client Install Command as Follows:" 137 175 echo "cd ~" 138 176 echo "mkdir NutchezClientInstall" 139 echo "scp $WhereAmI/*~/NutchezClientInstall"177 echo "scp 安裝的shell檔所在路徑/PATH/ ~/NutchezClientInstall" 140 178 echo "./client_install" 141 179 }
Note: See TracChangeset
for help on using the changeset viewer.