Bug 178781 - sys-apps/lm_sensors init.d bashisms
Bug#: 178781 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: phreak@gentoo.org Reported By: mike@mikearthur.co.uk
Component: Ebuilds
URL: 
Summary: sys-apps/lm_sensors init.d bashisms
Keywords:  
Status Whiteboard: 
Opened: 2007-05-16 15:18 0000
Description:   Opened: 2007-05-16 15:18 0000
Bashisms in /etc/init.d/lm_sensors cause 

Line 26 of /etc/init.d/lm_sensors
if [ ${?} == 0 ]; then
should be
if [ ${?} = 0 ]; then

Line 59 of /etc/init.d/lm_sensors
i=$((i+1))
should be
i=$((${i}+1))

------- Comment #1 From Christian Heim (RETIRED) 2007-05-17 07:30:07 0000 -------
Thanks Mike, I've fixed them locally and I'm going to commit them in a minute.

------- Comment #2 From Mike Arthur 2007-05-17 22:54:40 0000 -------
Woops, noticed another.

Line 92 of /etc/init.d/lm_sensors
i=$((i-1))
should be
i=$(($i-1))

------- Comment #3 From Christian Heim (RETIRED) 2007-05-18 07:51:34 0000 -------
(In reply to comment #2)
> Woops, noticed another.
> 
> Line 92 of /etc/init.d/lm_sensors
> i=$((i-1))
> should be
> i=$(($i-1))

'k, fixed the remaining ones too.