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

Bug 360789

Summary: sys-apps/openrc-0.8.0: net.lo init.d fails to start when /bin/sh is not bash
Product: Gentoo Linux Reporter: Jens Rutschmann <Jens.Rutschmann>
Component: [OLD] baselayoutAssignee: OpenRC Team <openrc>
Status: RESOLVED DUPLICATE    
Severity: normal CC: jmbsvicetto
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Jens Rutschmann 2011-03-27 14:51:46 UTC
On my system I have /bin/sh symlinked to /bin/dash (app-shells/dash).
Since the 0.8 upgrade of openrc the net.lo init.d fails to start:

net.lo            | * Bringing up interface lo
net.lo            |/lib/rc/sh/runscript.sh: 1: Bad substitution
net.lo            | * ERROR: net.lo failed to start

Using einfo statements I tracked it to this loop in the start() function (lines 504-508):

for module in ${MODULES}; do
    if [ "$(command -v "${module}_pre_start")" = "${module}_pre_start" ]; then
        ${module}_pre_start || exit $?
    fi
done

Unfortunately my shell scripting skills are not that good so I couldn't find the real error here, as for some modules the loop code passes fine.

$MODULES is: "apipa arping bonding tuntap ccwgroup ethtool macchanger macnet netplugd wpa_supplicant ssidnet iproute2 pppd system vlan dhcpcd ip6to4"

The error occurs when processing the module "ethtool" and trying to invoke the respective pre_start function (the if-branch is entered).

When I set /bin/sh back to bash net.lo starts fine.
Comment 1 SpanKY gentoo-dev 2011-03-27 15:48:14 UTC

*** This bug has been marked as a duplicate of bug 360367 ***