Summary: | net-p2p/deluge-1.3.5 init.d script does not apply DELUGED_OPTS | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Craig Andrews <candrews> |
Component: | Current packages | Assignee: | Paolo Pedroni <paolo.pedroni> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | candrews, heissfuss, julian, net-p2p |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Craig Andrews
![]() I have stumbled upon this too. I also suggest to quote ${DELUGED_USER_HOME}, b/c it can legitimately contain spaces. This leaves us with this line: --exec /usr/bin/deluged -e HOME="${DELUGED_USER_HOME}" -- --do-not-daemonize ${DELUGED_OPTS} Also, DELUGED_OPTS is not listed in the default /etc/conf.d/deluge, so users need to read the init script to find the variable name. Hi candrews, Could you please paste your /etc/conf.d/deluged? In my case, # grep D_OPTS /etc/conf.d/deluged DELUGED_OPTS="-p 11111" # rc-service deluged restart * Stopping Deluged ... * Starting Deluged ... # ps ax | grep deluged 10040 ? Ssl 0:00 /usr/bin/python2.7 /usr/bin/deluged --do-not-daemonize -p 11111 $DELUGED_OPTS is counted. (In reply to comment #1) > I have stumbled upon this too. I also suggest to quote ${DELUGED_USER_HOME}, > b/c it can legitimately contain spaces. This leaves us with this line: > > --exec /usr/bin/deluged -e HOME="${DELUGED_USER_HOME}" -- --do-not-daemonize > ${DELUGED_OPTS} I have quoted this. Thanks. (In reply to comment #2) > Also, DELUGED_OPTS is not listed in the default /etc/conf.d/deluge, so users > need to read the init script to find the variable name. Added an example of DELUGED_OPTS to conf.d/deluged, thanks. (In reply to comment #3) $ cat /etc/conf.d/deluged # /etc/conf.d/deluged # Change this to the user you want to run deluged as. # You may specify a group too, after a colon DELUGED_USER="p2p:p2p" DELUGEUI_START="false" DELUGEUI_OPTS="-u web" DELUGED_OPTS="-l /var/log/deluge.log -L info" (In reply to comment #6) > DELUGED_OPTS="-l /var/log/deluge.log -L info" and this line is not applied? > # ps ax | grep deluged > 10040 ? Ssl 0:00 /usr/bin/python2.7 /usr/bin/deluged --do-not-daemonize -p 11111 > $DELUGED_OPTS is counted. This is not an adequate test by any measure. ps doesn't show the difference between, e.g. deluged -l 11111 -L deluged.log and deluged "-l 11111 -L deluged.log" I think the difference should be obvious already, but just to point it out, in the former case deluged executable gets 4 arguments, whereas in the latter it gets one monolithic argument "-l 11111 -L deluged.log", which it is unable to parse. Deluge chokes on the unparseable option and doesn't really apply it, but still marches on, which is why you don't see any difference. But if you really do run the above two commands, you'll notice that the latter command doesn't create "deluged.log" in current directory. This is the effect of quotes around DELUGED_OPTS, and it should be avoided. So, as I've been saying before, the line should read: --exec /usr/bin/deluged -e HOME="${DELUGED_USER_HOME}" -- --do-not-daemonize ${DELUGED_OPTS} I made a copy-paste typo. "-l 11111" should read "-l debug" Gosh, I should get more sleep. Mixed case of -l and -L options. It should read "-L debug -l deluged.log" commit f5049e856eb8a5811df3e7bcb6daf43875a88511 Author: Paolo Pedroni <paolo.pedroni@iol.it> Date: Fri Feb 12 11:23:25 2016 +0100 net-p2p/deluge: unquote ${DELUGED_OPTS} in openrc init file Fixes bug #437350. Thanks to Alex Belykh <albel727@ngs.ru> |