Roland Rosenfeld wrote:
> Hi Björn!
>
> On Tue, 03 Mar 2009, Björn Påhlsson wrote:
>
>> If privoxy fails to start (at least when there are missing action
>> files), then there is no indication from the start script used by
>> invoke-rc.d, and invoke-rc.d doesnt return any error exit code.
>>
>> # invoke-rc.d privoxy start
>> # echo $?
>> 0
>
> Very strange, it should at least output anything:
>
> # invoke-rc.d privoxy stop
> Stopping filtering proxy server: privoxy.
>
> # mv /etc/privoxy/default.action /etc/privoxy/default.action.ignore
> # invoke-rc.d privoxy start
> Starting filtering proxy server: privoxy failed!

More testing.
Tested purging privoxy (aptitude purge privoxy) and then installing it
again (aptitude install privoxy).

then:
# invoke-rc.d privoxy stop
# mv /etc/privoxy/default.action /etc/privoxy/default.action.ignore
# invoke-rc.d privoxy start
# ps auxww | grep privoxy
root      7077  0.0  0.0    324    24 pts/0    R+   18:07   0:00 grep
privoxy

still no output, or running process.

So I ran:
# sh -x /etc/init.d/privoxy start > output 2>&1

So maybe it will help provide more information.

after, it, I reverted the move, and tested that it still worked.

# mv default.action.ignore default.action
# invoke-rc.d privoxy start
# ps auxww | grep privoxy
privoxy   7100  0.0  0.0  21280  1292 ?        Ss   18:10   0:00
/usr/sbin/privoxy --pidfile /var/run/privoxy.pid --user privoxy
/etc/privoxy/config
root      7102  0.0  0.0   6392   788 pts/0    S+   18:10   0:00 grep
privoxy


>> # /usr/sbin/privoxy
>> Mar 03 14:40:09.675 7fde0d1096f0 Fatal error: can't check
configuration file '//config':  No such file or directory

Yes, I noticed that I need to write /usr/sbin/privoxy --user privoxy
/etc/privoxy/config to make it work. doing that with default.action as
default.action.ignore doesnt produce any output but returns 1 as error
return code.

# privoxy --user privoxy /etc/privoxy/config
# echo $?
1

# privoxy --no-daemon --user privoxy /etc/privoxy/config
Mar 04 18:15:34.605 7f9cfebd76f0 Fatal error: can't load actions file
'/etc/privoxy/default.action': No such file or directory. Note that
beginning with Privoxy 3.0.7, actions files have to be specified with
their complete file names.
# echo $?
1

> Okay, the missing config file has to be written to stderr, because the
> log file is configured in the config file.  In contrast to this, the
> missing action file is logged to /var/log/privoxy/logfile.  But there
> should be a message that privoxy is started.  Maybe there exists some
> problem with your lsb-base package, which is used in this version of
> privoxy, but you seem to have installed the same version that I have
> here.

Yes, it was logged to the logfile.

Mar 04 18:13:51.060 7f0fafe606f0 Fatal error: can't load actions file
'/etc/privoxy/default.action': No such file or directory. Note that
beginning with Privoxy 3.0.7, actions files have to be specified with
their complete file names.

no other text in the log.

Im running lsb-base on version 3.2-20 (Debian unstable). If you need
anything more let me know :).

/Belorn
+ PATH=/sbin:/usr/sbin:/bin:/usr/bin
+ DESC='filtering proxy server'
+ NAME=privoxy
+ DAEMON=/usr/sbin/privoxy
+ PIDFILE=/var/run/privoxy.pid
+ OWNER=privoxy
+ CONFIGFILE=/etc/privoxy/config
+ DAEMON_ARGS='--pidfile /var/run/privoxy.pid --user privoxy 
/etc/privoxy/config'
+ SCRIPTNAME=/etc/init.d/privoxy
+ LOGDIR=/var/log/privoxy
+ DEFAULTSFILE=/etc/default/privoxy
+ '[' -x /usr/sbin/privoxy ']'
+ '[' -r /etc/default/privoxy ']'
+ '[' '!' -d /var/log/privoxy ']'
+ . /lib/init/vars.sh
++ '[' -f /etc/default/rcS ']'
++ . /etc/default/rcS
+++ TMPTIME=0
+++ SULOGIN=no
+++ DELAYLOGIN=no
+++ UTC=yes
+++ VERBOSE=no
+++ FSCKFIX=no
+++ RAMRUN=no
+++ RAMLOCK=no
++ '[' -r /proc/cmdline ']'
++ grep -q ' noswap' /proc/cmdline
++ NOSWAP=no
++ '[' '!' -e /proc/cmdline ']'
++ egrep -qw quiet /proc/cmdline
++ '[' '' ']'
++ true
+ . /lib/lsb/init-functions
++ FANCYTTY=
++ '[' -e /etc/lsb-base-logging.sh ']'
++ true
+ case "$1" in
+ '[' '' = no ']'
+ '[' no '!=' no ']'
+ do_start
+ start-stop-daemon --start --quiet --pidfile /var/run/privoxy.pid --exec 
/usr/sbin/privoxy --test
+ start-stop-daemon --start --quiet --pidfile /var/run/privoxy.pid --exec 
/usr/sbin/privoxy -- --pidfile /var/run/privoxy.pid --user privoxy 
/etc/privoxy/config
+ return 2
+ case "$?" in
+ '[' no '!=' no ']'
+ :

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to