Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 209115 - net-proxy/tinyproxy init.d script is not POSIX compliant
Summary: net-proxy/tinyproxy init.d script is not POSIX compliant
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: Gentoo Network Proxy Developers (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-06 10:44 UTC by Natanael Copa
Modified: 2008-02-16 07:13 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.