Changeset 1417 for trunk/locker/deploy
- Timestamp:
- Jan 13, 2010, 12:08:55 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/locker/deploy/bin/onathena
-
Property
svn:mergeinfo
set to
False
/branches/fc11-dev/locker/deploy/bin/onathena merged eligible /branches/locker-dev/locker/deploy/bin/onathena merged eligible
r1217 r1417 15 15 exit 1 16 16 } 17 17 18 attach scripts 18 19 19 20 sshrun() { 20 athrun scriptsscripts-ssh "$lname" "/mit/scripts/$@" 2>/dev/null21 /afs/athena.mit.edu/contrib/scripts/bin$scriptsdev/scripts-ssh "$lname" "/mit/scripts/$@" 2>/dev/null 21 22 } 22 23 23 24 vsshrun() { 24 athrun scriptsscripts-ssh "$lname" "/mit/scripts/$@"25 /afs/athena.mit.edu/contrib/scripts/bin$scriptsdev/scripts-ssh "$lname" "/mit/scripts/$@" 25 26 } 26 27 … … 158 159 fi 159 160 160 if [ "$prompt_username" = "" ]; then161 admin_username="admin"162 prompt_username=0163 fi164 if [ "$prompt_password" = "" ]; then165 prompt_password=1166 fi167 168 if [ "$prompt_username" -eq 1 ]; then169 echo170 echo "You will be able to log in to $sname using a username of your choice."171 echo "Please decide upon a username and enter it below."172 echo "Your username must contain only alphanumeric characters (a-z, 0-9)."173 printf "Desired username: "174 read admin_username175 admin_username=`perl -0e 'print $ARGV[0] =~ /^([[:alnum:]]+)$/' -- "$admin_username"`176 if [ "$admin_username" = "" ]; then177 echo178 echo ERROR:179 echo "Your username must contain only alphanumeric characters (a-z, 0-9)."180 echo "You will need to run the installer again and choose a different username."181 exit 1182 fi183 fi184 185 161 origdir=`pwd` 186 162 mkdir -p "$lroot/web_scripts_tmp" … … 198 174 fs sa . system:scripts-security-upd write 199 175 200 if [ "$prompt_password" -eq 1 ]; then201 stty -echo202 sshrun "deploy$scriptsdev/bin/prompt-password" "$sname" "$deploy" "$addrend" "$admin_username"203 stty echo204 fi205 206 echo207 echo "Unpacking $sname... (this step might take several minutes)"208 209 176 # This version is deprecated, use create_scripts_dir instead 210 177 … … 235 202 fi 236 203 237 # xavid: use p to keep the same permissions as in the file 238 athrun scripts gtar zxpf "/mit/scripts/deploy$scriptsdev/$deploy.tar.gz" 239 files=`athrun scripts gfind . -mindepth 1 -maxdepth 1 | grep -v .admin` 240 numfiles=`echo "$files" | wc -l` 241 if [ ! -z "$files" ]; then 242 if [ "$numfiles" -eq 1 ]; then 243 athrun scripts gfind . -mindepth 2 -maxdepth 2 | xargs -i mv \{} . 244 rmdir "$files" 204 if [ "$wizard" != "" ]; then 205 vsshrun "wizard/bin/wizard" "install" "$@" "$wizard" "$lroot/web_scripts/$addrend" 206 exit 0 207 fi 208 209 if [ "$prompt_username" = "" ]; then 210 admin_username="admin" 211 prompt_username=0 212 fi 213 if [ "$prompt_password" = "" ]; then 214 prompt_password=1 215 fi 216 217 if [ "$prompt_username" -eq 1 ]; then 218 echo 219 echo "You will be able to log in to $sname using a username of your choice." 220 echo "Please decide upon a username and enter it below." 221 echo "Your username must contain only alphanumeric characters (a-z, 0-9)." 222 printf "Desired username: " 223 read admin_username 224 admin_username=`perl -0e 'print $ARGV[0] =~ /^([[:alnum:]]+)$/' -- "$admin_username"` 225 if [ "$admin_username" = "" ]; then 226 echo 227 echo ERROR: 228 echo "Your username must contain only alphanumeric characters (a-z, 0-9)." 229 echo "You will need to run the installer again and choose a different username." 230 exit 1 245 231 fi 246 232 fi 247 if [ -f "/mit/scripts/deploy$scriptsdev/php.ini/$deploy" ]; then 248 nodot=`echo "$lname" | sed "/\./s///"`; 249 sed -e "/SCRIPTS_USER/ s//$lname/" -e "/SCRIPTS_NODOT/ s//$nodot/" "/mit/scripts/deploy$scriptsdev/php.ini/$deploy" > php.ini 250 athrun scripts gfind . -mindepth 1 -type d -exec sh -c 'ln -sf "`echo "$1" | sed '\''s,[^/],,g; s,/,../,g'\''`php.ini" "$1/"' -- {} \; 251 fi 233 234 if [ "$prompt_password" -eq 1 ]; then 235 stty -echo 236 sshrun "deploy$scriptsdev/bin/prompt-password" "$sname" "$deploy" "$addrend" "$admin_username" 237 stty echo 238 fi 239 252 240 cd "$origdir" 253 241 254 vsshrun "deploy$scriptsdev/bin/$deploy" "$sname" "$deploy" "$addrend" "$admin_username" "$requires_sql" "$scriptsdev" "$USER" || die "Unknown failure during configuration" 242 echo 243 echo "Unpacking $sname... (this step might take several minutes)" 244 245 vsshrun "deploy$scriptsdev/bin/$deploy" "$lname" "$sname" "$deploy" "$addrend" "$admin_username" "$requires_sql" "$scriptsdev" "$USER" || die "Unknown failure during configuration" 255 246 rm -f "$lroot/web_scripts/$addrend/.scripts-tmp" 256 247 checkfailed -
Property
svn:mergeinfo
set to
False
Note: See TracChangeset
for help on using the changeset viewer.