Anonymous | Login | Signup for a new account | 11-10-2008 11:04 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0000947 | [BusyBox] Standards Compliance | minor | always | 07-14-06 09:02 | 02-15-08 07:02 | ||||
Reporter | anthony | View Status | public | ||||||
Assigned To | BusyBox | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | 1.2.x | ||||||
Summary | 0000947: The order of variable evaluation by bash's implementation of /bin/sh differs from normal /bin/sh | ||||||||
Description |
For the command X=usbdev X=${X#usbdev} B=${X%%.*} D=${X#*.}; echo bus/usb/$B/$D On the normal /bin/sh, the result is: bus/usb/1/2 On busybox's /bin/sh, the result is: bus/usb// To get the same result you need to modify the command to: X=usbdev; X=${X#usbdev}; B=${X%%.*} D=${X#*.}; echo bus/usb/$B/$D This seems to be a difference in the way the two shells evaluate variables, and means that some scripts when copied from a standard environment to a busybox environment may fail unexpectedly. (I picked this up when copying udev rules into an initramdisk that uses busybox). This is true for all versions of busy box from 1.1.2 to the current development version. |
||||||||
Additional Information | |||||||||
Attached Files | |||||||||
|
Copyright © 2000 - 2006 Mantis Group |