[oe-issues] [Bug 1582] New: un-initialised variables in if statement make script error

bugzilla-daemon at tinman.treke.net bugzilla-daemon at tinman.treke.net
Tue Nov 14 12:35:47 UTC 2006


http://bugs.openembedded.org/show_bug.cgi?id=1582

           Summary: un-initialised variables in if statement make script
                    error
           Product: Openembedded
           Version: Angstrom
          Platform: All
               URL: http://www.openembedded.org/repo/org.openembedded.dev/pa
                    ckages/sysvinit/sysvinit/angstrom/rc
        OS/Version: Linux
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: Build
        AssignedTo: openembedded-issues at lists.openembedded.org
        ReportedBy: marcusbrutus at internode.on.net
         QAContact: tinderbox-oe at gmx.net


if [ $(($num_steps + $first_step)) -lt 1 ]; then
        numsteps="10"                           
        first_step="1"                          
fi    


During boot, neither of these variables have been set, causing rc to be invalid
and boot hangs.

A quick fix is:
if [ $(($num_steps + ${first_step:-0})) -lt 1 ]; then

(but might not be correct if num_steps>0 and first_step=null)


-- 
Configure bugmail: http://bugs.openembedded.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.




More information about the Openembedded-issues mailing list