Ignore:
Timestamp:
Feb 26, 2010, 2:25:25 AM (14 years ago)
Author:
mitchb
Message:
Support out-of-locker autoinstallers

This parameterizes the locker that the autoinstaller lives in, as
well as the contact info for the autoinstaller's maintainer.
(Merge of r1491:1496 from branches/locker-dev to trunk, originally from broder)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/locker/deploy/bin/onathena

    r1421 r1497  
    11#!/bin/sh
     2
     3: ${aicontact:=scripts@mit.edu}
     4: ${aimaintainer:=scripts.mit.edu}
     5: ${ailocker:=scripts}
     6
    27
    38checkfailed() {
     
    1217  echo "Sorry, the installation failed:"
    1318  echo "$@"
    14   echo "Please contact scripts@mit.edu and provide a copy of the output of this installer."
     19  echo "Please contact $aicontact and provide a copy of the output of this installer."
    1520  exit 1
    1621}
    1722
    1823attach scripts
     24[ "$ailocker" != "scripts" ] && attach "$ailocker"
    1925
    2026sshrun() {
    21   /afs/athena.mit.edu/contrib/scripts/bin$scriptsdev/scripts-ssh "$lname" "/mit/scripts/$@" 2>/dev/null
     27  /afs/athena.mit.edu/contrib/scripts/bin$scriptsdev/scripts-ssh "$lname" "$@" 2>/dev/null
    2228}
    2329
    2430vsshrun() {
    25   /afs/athena.mit.edu/contrib/scripts/bin$scriptsdev/scripts-ssh "$lname" "/mit/scripts/$@"
     31  /afs/athena.mit.edu/contrib/scripts/bin$scriptsdev/scripts-ssh "$lname" "$@"
    2632}
    2733
    2834checksqlpass() {
    29     errors=`sshrun "sql/bin$scriptsdev/test-password"`
     35    errors=`sshrun "/mit/scripts/sql/bin$scriptsdev/test-password"`
    3036    if [ "$errors" != "" ]; then
    3137        if [ "$1" -eq 1 ]; then
     
    4147override=1
    4248if [ "$override" = "" ]; then
    43 echo "The scripts.mit.edu automatic installers are currently unavailable."
     49echo "The $aimaintainer automatic installers are currently unavailable."
    4450echo "We hope to make them available again soon."
    4551echo "If you would like us to notify you as soon as they are available again,"
    46 echo "let us know by sending us an e-mail at scripts@mit.edu"
     52echo "let us know by sending us an e-mail at $aicontact"
    4753exit
    4854fi
    4955
    5056echo
    51 echo "== Welcome to the scripts.mit.edu installer for $sname =="
     57echo "== Welcome to the $aimaintainer installer for $sname =="
    5258echo
    5359
     
    5561echo "see <http://scripts.mit.edu/start>."
    5662echo
    57 echo "Please report problems with this installer to scripts@mit.edu."
     63echo "Please report problems with this installer to $aicontact."
    5864echo
    5965echo "Are you performing this install for:"
     
    118124    echo "You already have a directory corresponding to that web address."
    119125    echo "Please remove that directory, choose a different address, or"
    120     echo "contact scripts@mit.edu for assistance."
     126    echo "contact $aicontact for assistance."
    121127    exit 1
    122128fi
     
    137143
    138144if [ "$requires_sql" -eq 1 ]; then
    139   sqlinfo=`sshrun "sql/bin$scriptsdev/get-password"`
     145  sqlinfo=`sshrun "/mit/scripts/sql/bin$scriptsdev/get-password"`
    140146  if [ "$sqlinfo" = "" ]; then
    141147      echo
     
    203209
    204210if [ "$wizard" != "" ]; then
    205   vsshrun "wizard/bin/wizard" "install" "$@" "$wizard" "$lroot/web_scripts/$addrend"
     211  vsshrun "/mit/$ailocker/wizard/bin/wizard" "install" "$@" "$wizard" "$lroot/web_scripts/$addrend"
    206212  exit 0
    207213fi
     
    234240if [ "$prompt_password" -eq 1 ]; then
    235241    stty -echo
    236     sshrun "deploy$scriptsdev/bin/prompt-password" "$sname" "$deploy" "$addrend" "$admin_username"
     242    sshrun "/mit/$ailocker/deploy$scriptsdev/bin/prompt-password" "$sname" "$deploy" "$addrend" "$admin_username"
    237243    stty echo
    238244fi
     
    241247echo "Unpacking $sname... (this step might take several minutes)"
    242248# xavid: use p to keep the same permissions as in the file
    243 athrun scripts gtar zxpf "/mit/scripts/deploy$scriptsdev/$deploy.tar.gz"
     249athrun scripts gtar zxpf "/mit/$ailocker/deploy$scriptsdev/$deploy.tar.gz"
    244250files=`athrun scripts gfind . -mindepth 1 -maxdepth 1 | grep -v .admin`
    245251numfiles=`echo "$files" | wc -l`
     
    250256    fi
    251257fi
    252 if [ -f "/mit/scripts/deploy$scriptsdev/php.ini/$deploy" ]; then
     258if [ -f "/mit/$ailocker/deploy$scriptsdev/php.ini/$deploy" ]; then
    253259        nodot=`echo "$lname" | sed "/\./s///"`;
    254         sed -e "/SCRIPTS_USER/ s//$lname/" -e "/SCRIPTS_NODOT/ s//$nodot/" "/mit/scripts/deploy$scriptsdev/php.ini/$deploy" > php.ini
     260        sed -e "/SCRIPTS_USER/ s//$lname/" -e "/SCRIPTS_NODOT/ s//$nodot/" "/mit/$ailocker/deploy$scriptsdev/php.ini/$deploy" > php.ini
    255261        athrun scripts gfind . -mindepth 1 -type d -exec sh -c 'ln -sf "`echo "$1" | sed '\''s,[^/],,g; s,/,../,g'\''`php.ini" "$1/"' -- {} \;
    256262fi
    257263cd "$origdir"
    258264
    259 vsshrun "deploy$scriptsdev/bin/$deploy" "$sname" "$deploy" "$addrend" "$admin_username" "$requires_sql" "$scriptsdev" "$USER" || die "Unknown failure during configuration"
     265vsshrun "/mit/$ailocker/deploy$scriptsdev/bin/$deploy" "$sname" "$deploy" "$addrend" "$admin_username" "$requires_sql" "$scriptsdev" "$USER" || die "Unknown failure during configuration"
    260266rm -f "$lroot/web_scripts/$addrend/.scripts-tmp"
    261267checkfailed
     
    267273echo "(You can replace the http with https if you want to use encryption)"
    268274echo "If you have trouble accessing it, feel free to contact"
    269 echo "the scripts.mit.edu team by e-mailing scripts@mit.edu"
     275echo "the $aimaintainer team by e-mailing $aicontact"
    270276exit 0
Note: See TracChangeset for help on using the changeset viewer.