FS#13180 - /arch/setup fails on bad input while auto-preparing the hard drive
Attached to Project:
Release Engineering
Opened by Alessandro Doro (adoroo) - Monday, 09 February 2009, 22:11 GMT
Last edited by Dieter Plaetinck (Dieter_be) - Saturday, 14 February 2009, 15:49 GMT
Opened by Alessandro Doro (adoroo) - Monday, 09 February 2009, 22:11 GMT
Last edited by Dieter Plaetinck (Dieter_be) - Saturday, 14 February 2009, 15:49 GMT
|
Details
line 401:
if [ "$SWAP_PART_SIZE" = "" -o "$SWAP_PART_SIZE" -le "0" ]; then line 414: if [ "$ROOT_PART_SIZE" = "" -o "$ROOT_PART_SIZE" -le "0" ]; then If I leave the input box empty while setting the swap o root partition size the script aborts. Test cases: $ a=""; b=""; if [ "$a" = "" -o "$b" -eq "3" ]; then echo yes; fi -bash: [: b: integer expression expected $ a=""; b=""; if test "$a" == "" -o "$b" -eq "3" ; then echo yes; fi -bash: test: : integer expression expected $ a=""; b=""; if test "$a" == "" || "$b" -eq "3" ; then echo yes; fi yes but the second test is omitted and this isn't the desired behaviour, so the minimum size check should stay alone. archlinux-2009.02-RC1-ftp-i686.iso |
This task depends upon
Closed by Dieter Plaetinck (Dieter_be)
Saturday, 14 February 2009, 15:49 GMT
Reason for closing: Fixed
Additional comments about closing: Closing this because it works in aif. it doesn't in /arch/setup though.
Saturday, 14 February 2009, 15:49 GMT
Reason for closing: Fixed
Additional comments about closing: Closing this because it works in aif. it doesn't in /arch/setup though.
AIF has a function ask_number for this, it checks if the input really is a number with [[ $ANSWER_NUMBER = *[^0-9]* ]]
Thanks for the report, but since we will deprecate /arch/setup in favor of AIF I'm not sure anyone will fix it in /arch/setup...
However aif has the correct behavior, I hope that satisfies you :)