Opened 6 years ago

Closed 6 years ago

Last modified 4 years ago

#11155 closed defect (fixed)

wrong syntax in base-files/lib/preinit/05_set_ether_mac_rdc

Reported by: edson irm at gmail Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: Cc:


In package base-files_104-unknown_rdc.ipk,
file lib/preinit/05_set_ether_mac_rdc,

line 12: [ -n $kernel ] && ...
should be: [ -n "$kernel" ] && ...

To see that, let's examine what happens if the kernel variable is
unset, set by kernel=, or even kernel="": as the shell replaces all variables before execution,

[ -n $kernel ] is replaced by
[ -n ], wich evaluates to true (not what meant),


[ -n "$kernel" ] is replaced by
[ -n "" ], wich evaluates to false (yup).

Same in lines 20 and 24, where we found

[ -n $mac0 ] and
[ -n $mac1 ], respectively.

The impact, when this variables are unset, is the execution of the command

ifconfig eth0 hw ether

as the last command in the script, wich returns a nonzero value, causes the script itself to return a nonzero value, and ultimately, the entire boot sequence to freeze.

I came with this problem in a bifferboard, needed to correct the syntax to be able to initialize the system.

Attachments (0)

Change History (2)

comment:1 Changed 6 years ago by jow

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r31030 - thanks for tracking this down.

comment:2 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

as closed .
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.