Getting this all the time on boot: * Bringing up interface bond0 /lib/rc/net/bonding.sh: line 48: echo: write error: Operation not permitted /lib/rc/net/bonding.sh: line 48: echo: write error: Operation not permitted Relevant configuration from /etc/conf.d/net: config_eth0="null" config_eth1="null" ifdown_eth0="NO" ifdown_eth1="NO" config_bond0="dhcp" dhcpcd_bond0="-t 10" dhcp_bond0="nontp" slaves_bond0="eth0 eth1" miimon_bond0="100" use_carrier_bond0="1" downdelay_bond0="100" updelay_bond0="100" mode_bond0="active-backup" primary_bond0="eth0"
Does this also happen with openrc-0.6.1? Please paste your emerge --info and emerge -pv openrc output. Also any dmesg or /var/log/messages output and maybe your "/etc/init.d/net.bond0 -d start" output. Thank you.
Yes, it does happen with 0.6.1 as well since the relevant code in the script hasn't changed. Whatever, the reason this happens is that the code parses the configuration values for each bond slave and tries to modify sysfs values that the kernel doesn't permit to be modified at that time. Didn't bother to track down which one of the options listen in comment #0 triggers this in my case, perhaps kernel folks could say. Frankly I don't expect any magic fix here, I'd merely suggest to redirect the output to /dev/null and move on. The bond itself is working perfectly fine (hence, the "cosmetic" in bug summary).
(In reply to comment #2) > Frankly I don't expect any magic fix here, I'd merely suggest to redirect the > output to /dev/null and move on. The bond itself is working perfectly fine > (hence, the "cosmetic" in bug summary). As an alternative, do echo the command itself that failed on non-zero return status, i.e., what the echo "${s}" >"${x}" was that triggered "Operation not permitted" which would help with debugging. As it is, the output is just not useful.
http://roy.marples.name/projects/openrc/changeset/ae7a92ae7b54fd832a211546edeb290f854fdad2
(In reply to comment #4) > http://roy.marples.name/projects/openrc/changeset/ae7a92ae7b54fd832a211546edeb290f854fdad2 Yeah, exactly like that, cool... consider this fixed :) Thanks.
This has been fixed upstream.
The "cosmetic bug" is still there in openrc-0.6.1-r1. The problem is, that /sys/class/net/bond1/bonding/slaves does follow an other syntax than the rest. This is why slaves are handled just below that loop, so slaves should not be handled at all in that loop. I suggest just letting ".../bonding/slaves" alone, hence the following fix here: ---------------------------------snip---------------------------------- --- bonding.sh.org 2010-05-18 15:17:00.544299188 +0200 +++ bonding.sh 2010-05-18 15:16:27.724300701 +0200 @@ -43,6 +43,8 @@ # Nice and dynamic :) for x in /sys/class/net/"${IFACE}"/bonding/*; do [ -f "${x}" ] || continue + # slaves need another syntax and will be handled separately + [ "${x##*/}" == "slaves" ] && continue eval s=\$${x##*/}_${IFVAR} if [ -n "${s}" ]; then echo "${s}" >"${x}" ---------------------------------snip----------------------------------