On 08/25/13 01:39, Loïc BLOT wrote:
In fact i'm not tired, it's logical :)

Here is my patched question:
ask_which "speed" "should $_d use" \
     "9600 19200 38400 57600 115200" $CSPEED $pxe_console_speed

Show:
[auto] instead if [9600] (auto is value of pxe_console_speed).

If i do a echo "speed: $CSPEED" before ask_which, CSPEED is empty
default argument is the first argument of the list.

A better patch could be:

ask_which "speed" "should $_d use" \
     "9600 19200 38400 57600 115200" ${CSPEED:-""}

That would be

        "9600 19200 38400 57600 115200" "$CSPEED"

in my world. ;-)


but this patch is useless without my pxe autoinstall patch, i think.

A diff is something produced by "[cvs] diff -uNp", IMHO.

/Alexander



--
Best regards,
Loïc BLOT,
UNIX systems, security and network expert
http://www.unix-experience.fr


Le dimanche 25 août 2013 à 01:19 +0200, Loïc BLOT a écrit :
Hmm you are right, i think i'm tired :)

--
Best regards,
Loc BLOT,
UNIX systems, security and network expert
http://www.unix-experience.fr


Le samedi 24 aot 2013  23:03 +0000, Christian Weisgerber a crit :
Loc BLOT <loic.b...@unix-experience.fr> wrote:

                 if [[ $resp == y ]]; then
                         ask_which "speed" "should $_d use" \
                                 "9600 19200 38400 57600 115200" $CSPEED
                         case $resp in
                         done)   defcons=n ;;
                         *)      CSPEED=$resp ;;
                         esac
                 fi

By adding a 5th argument to ask_which, i have seen that $CSPEED isn't
found, and in fact it's right. Before this ask_which CSPEED isn't set,
it's set after.

That analysis can't be right.  When I install OpenBSD on a Soekris
with the comBIOS default serial speed of 19200, the installer prompt
offers 19200 as default.

And a quick look at install.sub shows that the call to questions()
is preceded by this:

--------------->
CONSOLE=$(scan_dmesg '/^\([^ ]*\).*: console$/s//\1/p')
CONSOLE=${CONSOLE% }
[[ -n $CONSOLE ]] && CSPEED=$(stty speed)

# Look for the serial device matching the console. If we are not
installing
# from a serial console, just find the first serial device that could be
used
# as a console. If a suitable device is found, set CDEV, CTTY, CSPEED,
CPROM.
md_consoleinfo
<---------------

[demime 1.01d removed an attachment of type application/pgp-signature which
had a name of signature.asc]

[demime 1.01d removed an attachment of type application/pgp-signature which had 
a name of signature.asc]

Reply via email to