bugGNU GRUB - Bugs: bug #27320, `if <unknown command>' works...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #27320: `if <unknown command>' works wrongly

Submitter:  Felix Zielcke <fzielcke>
Submitted:  Wed 26 Aug 2009 11:02:24 AM UTC
   
 
Category:  None Severity:  Ordinary
Priority:  5 - Normal Item Group:  None
Status:  Fixed Privacy:  Public
Assigned to:  cjwatson Originator Name: 
Open/Closed:  Closed Release:  Bazaar - trunk
Release:  Reproducibility:  Every Time
Planned Release:  None

Tue 08 Sep 2009 07:12:22 PM UTC, comment #2: 

r2577 | cjwatson | 2009-09-08 20:10:34 +0100 (Tue, 08 Sep 2009) | 5 lines

2009-09-08  Colin Watson  <cjwatson@ubuntu.com>

        * script/sh/execute.c (grub_script_execute_cmdline): Set "?" in
        unknown-command case.  Fixes bug #27320.

Colin Watson <cjwatson>
Group Member
Sun 06 Sep 2009 06:38:08 PM UTC, comment #1: 

Ok seems like this totally depends if the `if' was already run or not.
Fresh grub-emu started:

sh:grub> if x ; then echo true ; else echo false ; fi
false
sh:grub> if x ; then echo true ; else echo false ; fi
true

Felix Zielcke <fzielcke>
Group Member
Wed 26 Aug 2009 11:02:24 AM UTC, original submission:  

sh:grub> if x ; then echo true ; else echo false ; fi
false
sh:grub> if x ; then set y=true ; echo $y ; else set y=false echo $y ; fi
true

It should even complain about a syntax error because there's a ; missing between `set y=false' and `echo $y'
Even with it added it still says true

Felix Zielcke <fzielcke>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by cjwatson (Updated the item)
  • -email is unavailable- added by fzielcke (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-09-08 cjwatson StatusNone Fixed
        Open/ClosedOpen Closed
    2009-09-08 cjwatson Assigned toNone cjwatson
    2009-09-06 fzielcke Summary`set\' inside `if\' behaves wrongly `if <unknown command>' works wrongly

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code