else
usermod -u `expr 600 + $j + 1` oracle && echo oracle:${upassword}|chpasswd \
&& profile ${user[j]} || errorExit ""
fi
}
#-----------------------------------------------------------------------------------------------
if [ $1 == "rac" ] || [ $1 == "RAC" ] ; then
adduser_rac $upassword && GetPath $1 || errorExit ""
elif [ $1 == "signle" ] || [ $1 == "SIGNLE" ] ; then
adduser_sigle $upassword && GetPath $1 || errorExit ""
fi
3、5 RAC安装的SSH等效配置(sshUserSetup.sh)
#!/bin/bash
#--------------------------------------------------------------------------------------
#这里本来是想着调用oracle安装包里面的sshUserSetup.sh进行SSH配置的,发现存在问题
#echo $USER | tr " " "\n"| while read LINE
#do
# EXPECT <<EOF
#spawn sh ./sshUserSetup.sh -user $LINE -hosts $NODES -verify -advanced
# expect {
# "yes/no" { send "yes\r";exp_continue }
#"yes or no" { send "yes\r";exp_continue }
# "password:"{send "$PASSWORD\r";exp_continue }
# }
#EXPECT eof
#EOF
#done
#---------------------------------------------------------------------------------------
NUM_OF_NODES=$1
NODE1=$2
NODE2=$3
NODE3=$4
LINE="root oracle grid"
EXPECT=/usr/bin/expect
PASSWD=$5
#USER_PROMPT="*$ "
USER_PROMPT="*# "
#以下脚本还未进行的测试,有兴趣的童鞋欢迎一起研究
echo $LINE | tr " " "\n"| while read USER
do
if [ "x${NODE1}" == "x" -o "x${USER}" == "x" -o "x${PASSWD}" == "x" ]; then
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/bofangqi/article-62078-14.html
亲爱的
一国两制行不通了