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

Bug 354511

Summary: sys-apps/openrc-0.7.0: typo in /lib/rc/net/iproute2.sh (trim/_trim)
Product: Gentoo Linux Reporter: Christian Wetzig <gentoo>
Component: [OLD] Core systemAssignee: OpenRC Team <openrc>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Christian Wetzig 2011-02-11 19:03:55 UTC
Usage of rules_[dev] in /etc/conf.d/net doesn't work

Reproducible: Always

Steps to Reproduce:
1. use rules_eth0="some ip rule" in /etc/conf.d/net
2. /etc/init.d/net.eth0 start


Actual Results:  
/lib/rc/net/iproute2.sh: line 224: trim: command not found.

Expected Results:  
ip rules added

--- iproute2.sh 2011-02-07 19:59:01.715475128 +0100
+++ iproute2_fix.sh     2011-02-11 19:53:35.486692863 +0100
@@ -221,7 +221,7 @@ _ip_rule_runner() {
        local IFS="$__IFS"
        for ru in $rules ; do
                unset IFS
-               ruN="$(trim "${ru}")"
+               ruN="$(_trim "${ru}")"
                [ -z "${ruN}" ] && continue
                vebegin "${cmd} ${ruN}"
                ip rule ${cmd} ${ru}
Comment 1 William Hubbs gentoo-dev 2011-02-12 19:43:07 UTC
This is fixed in git, commit 7bc920a.

Also, in the future, please post patches as attachments. If you put them inline in the comments, bugzilla corrupts them and makes it impossible to apply them to the tree.

Thanks for the report.