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

Bug 3650

Summary: bug in /sbin/rc
Product: Gentoo Linux Reporter: Felix von Leitner <felix-gentoo>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: 1.0   
Hardware: x86   
OS: Linux   
URL: http://www.gentoo.org/cgi-bin/viewcvs.cgi/gentoo-src/rc-scripts/sbin/rc?rev=1.24&content-type=text/vnd.viewcvs-markup
Whiteboard:
Package list:
Runtime testing required: ---

Description Felix von Leitner 2002-06-11 19:34:18 UTC
/sbin/rc contains the function try.  This function does:

local errstr="$((eval $*) 2>&1 >/dev/null)"

retval=$?



in this code, retval will _always_ be 0, because local is a command that never fails.  So the error handling code below it is never executed.  Solution: first do local errstr and then do the assignment in the next line.
Comment 1 Nicholas Jones (RETIRED) gentoo-dev 2002-06-12 06:13:56 UTC
Updated in cvs. Thanks.