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

Submitted by:  Felix Zielcke <fzielcke>
Submitted on:  Wed 26 Aug 2009 11:02:24 AM UTC  
 
Category: NoneSeverity: Ordinary
Priority: 5 - NormalItem Group: None
Status: FixedPrivacy: Public
Assigned to: Colin Watson <cjwatson>Originator Name: 
Open/Closed: ClosedRelease: 
Release: Bazaar - trunkReproducibility: 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>
Project MemberIn charge of this item.
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>
Project 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>
Project Member

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 08 Sep 2009 07:12:22 PM UTCcjwatsonStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Tue 08 Sep 2009 06:22:04 PM UTCcjwatsonAssigned toNone=>cjwatson
    Sun 06 Sep 2009 06:38:08 PM UTCfzielckeSummary`set\' inside `if\' behaves wrongly=>`if ' works wrongly

    Back to the top


    Powered by Savane 3.1-cleanup1