From 60f82e785de02b0322f3e52c5b87e43f7edc9473 Mon Sep 17 00:00:00 2001
From: Fabian Keil <fk@fabiankeil.de>
Date: Sat, 18 Nov 2006 14:06:14 +0000
Subject: [PATCH] Added warning that this script isn't supposed to be sourced
 in other rc scripts. Should prevent bug reports like #1542947.

Changed command line order to make sure
the config file is the last argument.
Thanks to William for reporting this.
---
 slackware/rc.privoxy.orig | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/slackware/rc.privoxy.orig b/slackware/rc.privoxy.orig
index 632a6b78..4c734fff 100644
--- a/slackware/rc.privoxy.orig
+++ b/slackware/rc.privoxy.orig
@@ -1,5 +1,9 @@
 #!/bin/sh
 #  ********************************************************************
+#  This script uses exit to return proper error codes,
+#  sourcing (. /path/to/rc.privoxy) it in your system's
+#  rc files is a bad idea.
+#  ********************************************************************
 
 RETVAL=1
 
@@ -19,14 +23,14 @@ if [ ! -f $PRIVOXY_CONF ] ; then exit 0 ;fi
 
 # See how we were called.
 
-PRIVOXY="$PRIVOXY_BIN $PRIVOXY_CONF"
+PRIVOXY="$PRIVOXY_BIN --user $PRIVOXY_USER.$PRIVOXY_GROUP --pidfile $PRIVOXY_PID $PRIVOXY_CONF"
 
 start () {
 	# start daemon
 	echo -n $"Starting $PRIVOXY_PRG: "
 
 	if [ ! -f $PRIVOXY_PID ]; then
-		($PRIVOXY --user $PRIVOXY_USER.$PRIVOXY_GROUP  --pidfile $PRIVOXY_PID 2>/dev/tty9 ) \
+		( $PRIVOXY 2>/dev/tty9 ) \
 			&& echo " OK" \
 			&& /bin/touch /var/lock/$PRIVOXY_PRG \
 			&& RETVAL=0
-- 
2.49.0