[Fusionforge-general] Installationproblem

Thorsten Glaser t.glaser at tarent.de
Fri Oct 9 09:45:00 CEST 2009


On Fri, 9 Oct 2009, Holger Schramm wrote:

> Read: 2: Illegal option -2

This is a bug in the script. Code lines in question:
│            $options="-er -s -p";
│            $returned=popen("read $options \"".GREEN.$prompt.NORMAL."\n\"; echo \$REPLY", 'r');

They assume GNU bash (I think) and make me cry… this is
a *must fix* on Fusionforge side. (Korn shell read -p has
to do with co-processes, and dash doesn’t have it at all.)

By the way, there’s an easier way to read passwords from
shell is this one:

│askpass() {
│	set -o noglob
│	stty -echo
│	echo -n "$1 "
│	read resp
│	stty echo
│	set +o noglob
│	echo
│}

I don’t know if “noglob” is POSIX right out of my head, but
it should be. 「stty」 is an external utility.

bye,
//mirabilos
-- 
tarent Gesellschaft für Softwareentwicklung und IT-Beratung mbH
Geschäftsführer: Boris Esser, Elmar Geese
HRB AG Bonn 5168 - Ust-ID: DE122264941
http://www.tarent.com/

Heilsbachstr. 24, 53123 Bonn,   fon +49 228 52675-0,   fax +49 228 52675-25
Weigandufer 45,   12059 Berlin, fon +49 30 5682943-30, fax +49 228 52675-25
Schützenstr. 18,  10117 Berlin, fon +49 30 27594853,   fax +49 30 78709617




More information about the Fusionforge-general mailing list