Ticket #217 (new defect)

Opened 4 months ago

Last modified 4 months ago

Error when setting bonding interface

Reported by: wiget.openid.pl Owned by: roy
Priority: minor Milestone:
Component: rc Version: 0.5
Keywords: Cc: openrc@frysiak.net

Description

In bonding.sh you can see this code:

    # Configure the bond.
    # Nice and dynamic :)
    for x in /sys/class/net/"${IFACE}"/bonding/*; do
        [ -f "${x}" ] || continue
        eval s=\$${x##*/}_${IFVAR}
        if [ -n "${s}" ]; then
            echo "${s}" >"${x}"
        fi
    done

I agree that this is nice and dynamic, but fail to write to /sys/class/net/"${IFACE}"/bonding/slaves file.

In my /etc/conf.d/net I have this line:

slaves_bond0="slave1 slave2"

and after expanding shell variables line 48 from bonding.sh look like below:

echo "slave1 slave2" >"/sys/class/net/bond0/bonding/slaves"

and generates following message:

/lib64/rc/net/bonding.sh: line 48: echo: write error: Operation not permitted

Concluding: /sys/class/net/*/bonding/slaves need special care and should be skipped in for loop.

OpenRC 0.6.1-r1 on Linux 2.6.32 kernel.

Change History

comment:1 Changed 4 months ago by wiget.openid.pl

  • Cc openrc@frysiak.net added
Note: See TracTickets for help on using tickets.