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

Bug 209115

Summary: net-proxy/tinyproxy init.d script is not POSIX compliant
Product: Gentoo Linux Reporter: Natanael Copa <natanael.copa>
Component: New packagesAssignee: Gentoo Network Proxy Developers (OBSOLETE) <net-proxy+disabled>
Status: RESOLVED FIXED    
Severity: trivial    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Natanael Copa 2008-02-06 10:44:53 UTC
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 Alin Năstac (RETIRED) gentoo-dev 2008-02-16 07:13:14 UTC
Fixed in cvs.

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