Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 359311

Summary: sys-apps/openrc-0.7.0 uses bashism in net/bonding.sh
Product: Gentoo Linux Reporter: Raffaello D. Di Napoli <rafdev>
Component: [OLD] baselayoutAssignee: OpenRC Team <openrc>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Fix bashism with POSIX-compliant code
ebuild patch to apply the above

Description Raffaello D. Di Napoli 2011-03-17 23:36:33 UTC
The file in summary contains the line:

  slaves="${slaves/${primary}/}"

which fails in busybox sh (and any other non-bash shell).
This replacement works, effectively removing the first instance of ${primary}:

  slaves="${slaves%%${primary}*}${slaves#*${primary}}"


Reproducible: Always
Comment 1 Raffaello D. Di Napoli 2011-03-17 23:42:35 UTC
Created attachment 266313 [details, diff]
Fix bashism with POSIX-compliant code
Comment 2 Raffaello D. Di Napoli 2011-03-17 23:44:38 UTC
Created attachment 266315 [details, diff]
ebuild patch to apply the above
Comment 3 SpanKY gentoo-dev 2011-03-18 18:25:34 UTC
that code is not equivalent.  ive fixed things this way instead:
http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commitdiff;h=9f5eb03e5ef30f4357d05e004f38ea6ca0d21346