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

Bug 179634

Summary: app-misc/lirc: irexec init script uses bashisms ([[ ]])
Product: Gentoo Linux Reporter: Diego Elio Pettenò (RETIRED) <flameeyes>
Component: New packagesAssignee: Television related Applications in Gentoo's Portage <media-tv>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Diego Elio Pettenò (RETIRED) gentoo-dev 2007-05-24 13:01:19 UTC
The irexec init script currently uses bashisms that are incompatible with FreeBSD's sh (and dash/busybox for Linux users). The problem is the line

if [[ ${IREXEC_USER} == "root" && ${IREXEC_DISABLE_ROOT_WARNING} != yes ]]; then

that should instead become something like

if [ "x${IREXEC_USER}" = "xroot" -a "x${IREXEC_DISABLE_ROOT_WARNING}" != "xyes" ]; then

This will work on every shell and should then be safer.

HTH,
Diego
Comment 1 Matthias Schwarzott gentoo-dev 2007-05-24 20:12:23 UTC
Commited.