Bug 209115 - net-proxy/tinyproxy init.d script is not POSIX compliant
Bug#: 209115 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: trivial Priority: P2
Resolution: FIXED Assigned To: net-proxy@gentoo.org Reported By: natanael.copa@gmail.com
Component: Ebuilds
URL: 
Summary: net-proxy/tinyproxy init.d script is not POSIX compliant
Keywords:  
Status Whiteboard: 
Opened: 2008-02-06 10:44 0000
Description:   Opened: 2008-02-06 10:44 0000
trivial to make it play nice with busybox and other non-bash shells:

--- data.orig/etc/init.d/tinyproxy      2007-09-20 14:58:55 +0000
+++ data/etc/init.d/tinyproxy   2008-02-06 10:40:10 +0000
@@ -17,10 +17,10 @@
 stop() {
        local pid=0
        if [ -f /var/run/tinyproxy.pid ] ; then
-               pid=$(</var/run/tinyproxy.pid)
+               pid=$(cat /var/run/tinyproxy.pid)
                rm /var/run/tinyproxy.pid
        fi
        ebegin "Stopping tinyproxy"
-       [ ${pid} -ne 0 ] && kill ${pid}
+       [ "${pid}" -ne 0 ] && kill "${pid}"
        eend $?
 }

------- Comment #1 From Alin Năstac 2008-02-16 07:13:14 0000 -------
Fixed in cvs.

The init script was a joke, so I rewrote it from scratch and revbumped the
package.