Changeset 1494 for branches/locker-dev


Ignore:
Timestamp:
Feb 26, 2010, 1:15:32 AM (15 years ago)
Author:
broder
Message:
Distinguish between scripts for scripts and scripts for autoinstallers.

Some pieces of the autoinstaller process are clearly tied to scripts
itself - e.g. scripts to get information from sql.mit.edu. Others are
clearly tied to the autoinstaller - e.g. the
/mit/scripts/deploy/bin/foo scripts.

Out-of-tree autoinstallers want to replace the latter, but not the
former.

For scripts that fall into the former category, explicitly call them
from /mit/scripts. For those that fall into the latter, call them from
/mit/$ailocker. New out-of-tree autoinstallers can define ailocker to
provide their own hooks.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/locker-dev/locker/deploy/bin/onathena

    r1493 r1494  
    33: ${aicontact:=scripts@mit.edu}
    44: ${aimaintainer:=scripts.mit.edu}
     5: ${ailocker=scripts}
    56
    67
     
    2122
    2223attach scripts
     24attach "$ailocker"
    2325
    2426sshrun() {
    25   /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
    2628}
    2729
    2830vsshrun() {
    29   /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" "$@"
    3032}
    3133
    3234checksqlpass() {
    33     errors=`sshrun "sql/bin$scriptsdev/test-password"`
     35    errors=`sshrun "/mit/scripts/sql/bin$scriptsdev/test-password"`
    3436    if [ "$errors" != "" ]; then
    3537        if [ "$1" -eq 1 ]; then
     
    141143
    142144if [ "$requires_sql" -eq 1 ]; then
    143   sqlinfo=`sshrun "sql/bin$scriptsdev/get-password"`
     145  sqlinfo=`sshrun "/mit/scripts/sql/bin$scriptsdev/get-password"`
    144146  if [ "$sqlinfo" = "" ]; then
    145147      echo
     
    207209
    208210if [ "$wizard" != "" ]; then
    209   vsshrun "wizard/bin/wizard" "install" "$@" "$wizard" "$lroot/web_scripts/$addrend"
     211  vsshrun "/mit/$ailocker/wizard/bin/wizard" "install" "$@" "$wizard" "$lroot/web_scripts/$addrend"
    210212  exit 0
    211213fi
     
    238240if [ "$prompt_password" -eq 1 ]; then
    239241    stty -echo
    240     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"
    241243    stty echo
    242244fi
     
    245247echo "Unpacking $sname... (this step might take several minutes)"
    246248# xavid: use p to keep the same permissions as in the file
    247 athrun scripts gtar zxpf "/mit/scripts/deploy$scriptsdev/$deploy.tar.gz"
     249athrun scripts gtar zxpf "/mit/$ailocker/deploy$scriptsdev/$deploy.tar.gz"
    248250files=`athrun scripts gfind . -mindepth 1 -maxdepth 1 | grep -v .admin`
    249251numfiles=`echo "$files" | wc -l`
     
    254256    fi
    255257fi
    256 if [ -f "/mit/scripts/deploy$scriptsdev/php.ini/$deploy" ]; then
     258if [ -f "/mit/$ailocker/deploy$scriptsdev/php.ini/$deploy" ]; then
    257259        nodot=`echo "$lname" | sed "/\./s///"`;
    258         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
    259261        athrun scripts gfind . -mindepth 1 -type d -exec sh -c 'ln -sf "`echo "$1" | sed '\''s,[^/],,g; s,/,../,g'\''`php.ini" "$1/"' -- {} \;
    260262fi
    261263cd "$origdir"
    262264
    263 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"
    264266rm -f "$lroot/web_scripts/$addrend/.scripts-tmp"
    265267checkfailed
Note: See TracChangeset for help on using the changeset viewer.