Opened 13 years ago

Closed 10 years ago

#233 closed defect (wontfix)

Do something sensible on 'athrun scripts scripts -start'

Reported by: ezyang Owned by:
Priority: normal Milestone:
Component: autoinstallers Keywords: starter, shell
Cc:

Description

Note the space before the dash. We don't error until we hit Wizard, which is too late.

Attachments (2)

athrun.patch (562 bytes) - added by elefthei 12 years ago.
Patch to trunk/server/common/oursrc/athrun/athrun.sh
scripts.patch (1.4 KB) - added by elefthei 12 years ago.
patch on trunk/locker/bin/scripts that takes care of arguments like ./scripts -start or ./scripts --start

Download all attachments as: .zip

Change History (14)

comment:1 Changed 13 years ago by adehnert

  • Keywords starter shell added

comment:2 Changed 12 years ago by adehnert

  • Summary changed from Do something sensible on 'athrun scripts -start' to Do something sensible on 'athrun scripts scripts -start'

"athrun scripts -start" does error (-start doesn't exist in the scripts locker). I think what was meant here is "athrun scripts scripts -start".

comment:3 Changed 12 years ago by elefthei

  • Owner set to elefthei
  • Status changed from new to assigned

Changed 12 years ago by elefthei

Patch to trunk/server/common/oursrc/athrun/athrun.sh

comment:4 Changed 12 years ago by elefthei

  • Resolution set to worksforme
  • Status changed from assigned to closed

comment:5 Changed 12 years ago by mitchb

  • Resolution worksforme deleted
  • Status changed from closed to reopened

comment:6 Changed 12 years ago by andersk

elefthei: Please stop closing our tickets without talking to us. Bugs are not fixed until the patch is reviewed, approved, merged into Subversion, and deployed.

$ athrun scripts scripts -start

Welcome to scripts.mit.edu. Which service would you like to use?
…
Please enter a number 1-5: 1
…
Please enter a number 1-9: 2
…
Please enter either '1' or '2' (without quotes): 1
…
Desired address: http://andersk.scripts.mit.edu/test-wordpress2
If you have trouble logging in, see http://scripts.mit.edu/faq/41/.
Usage: wizard install APP DIR [ -- SETUPARGS ]

Autoinstalls the application APP in the directory DIR.
This command will interactively ask for information to
complete the autoinstall.

You can also use --help with APP and DIR to find out what
are required SETUPARGS if you want to run this non-interactively
(the distribution of required and optional arguments may change
depending on what directory you are installing to.)

wizard: error: no such option: -s
Connection to scripts.mit.edu closed.
Last edited 12 years ago by andersk (previous) (diff)

comment:7 Changed 12 years ago by geofft

Patch to trunk/server/common/oursrc/athrun/athrun.sh

Is this for a different ticket? This ticket is about running "scripts -start" on Athena, which is I think unrelated to the fake athrun implementation on scripts.

Changed 12 years ago by elefthei

patch on trunk/locker/bin/scripts that takes care of arguments like ./scripts -start or ./scripts --start

comment:8 Changed 12 years ago by elefthei

  • Resolution set to worksforme
  • Status changed from reopened to closed

comment:9 Changed 12 years ago by adehnert

  • Resolution worksforme deleted
  • Status changed from closed to reopened

As per comment:6, "Bugs are not fixed until the patch is reviewed, approved, merged into Subversion, and deployed."

comment:10 Changed 12 years ago by elefthei

  • Owner elefthei deleted
  • Status changed from reopened to new

comment:11 Changed 12 years ago by geofft

First off, I don't think this feature is particularly helpful, since there's no need to call scripts-start mediawiki when you could just run scripts-mediawiki.

Past that, I'm a little skeptical of this code in particular because of its complexity:

for choice in `choices`; do 
  possibleChoice=`echo "$choice"|awk -F'[- ]' '{ print "-"$2 }'` 
  if [ "$possibleChoice" = "$1" -o "-$possibleChoice" = "$1" ]; then 
    num=`choices|grep -n '\'"$possibleChoice"|awk -F: '{ print $1 }'` 
    found=1 
    break 
  fi 
done 

If we decide we want this feature, is it possible to do it with something simpler on the order of

num=0
choices | while read choice description; do
   num=$((num+1))
   ...
done

?

comment:12 Changed 10 years ago by geofft

  • Resolution set to wontfix
  • Status changed from new to closed

We no longer refer to scripts-start on our website (just scripts), so I'm going to WONTFIX this, since that completely avoids the problem of people thinking of it as scripts -start.

Note: See TracTickets for help on using tickets.