/etc/init.d/transmission-daemon is run with /sbin/runscript This prevent environment variables to be transmitted to it, like http_proxy. If you use transmission with an Android client, it make impossible to send (url of) .torrent to the daemon (as the daemon can't access the web) A workaround (bugfix ? ) is to run /etc/init.d/transmission-daemon with /sbin/runscript.sh Reproducible: Always Steps to Reproduce: 1. Put transmission behind a proxy. Be sure you can't access the web without passing through the proxy. 2. Put http_proxy=http://my-proxy:port in /etc/profile, or somewhere it's sourced by your shell 3. Take an Android, put a transmission-aware bittorrent client (like torrent-fu or transdroid). Set it up 4. Make a search with the Android, and send the result to your transmission. Actual Results: Your torrent isn't being downloaded Expected Results: You can download torrent with an Android client
Try putting it in /etc/conf.d/transmission-daemon. For example. echo "export http_proxy=http://my-proxy:port" >> /etc/conf.d/transmission-daemon
Plopmaster, could you answer comment #1, please?
Sorry for the late ... It works with that workaround.
Plopmaster, do you use openrc? If so, could you, please, try set: rc_env_allow="http_proxy" I think this should add http_proxy to the whitelist of variable that runscript will sip to unset... void env_filter(void) { ... /* Add the user defined list of vars */ env_allow = rc_stringlist_split(rc_conf_value("rc_env_allow"), " "); ... TAILQ_FOREACH(env, env_list, entries) { ... /* Check our user defined list */ if (rc_stringlist_find(env_allow, env->value)) continue; /* OK, not allowed! */ unsetenv(env->value); } If this helps I'll ask our openrc guys to document this as this variable is not documented in runscript manual(8) page.
Sorry, I don't use openrc...
Ok, I'll CC openrc in any case. Guys does rc_env_allow is supposed to work as I described in comment 4? If so, could you document it, please? May be you know, does there exist similar mechanism for baselayout-1?
the init.d script is acting correctly. nothing for the transmission maintainers to "fix" here. use the method Peter described for openrc, or use /etc/conf.d/env_whitelist for baselayout-1 if you want to pass some vars.
Mike, thank you. But is this documented anywhere? I think man runscript(8) is a good place but may be there are better.. Looking in google people mentioned this variable in our bugzilla but not in documentation.
that would be the best place for it. probably want to mention runscript(8) in all the standard openrc config files too.
The following information is in /etc/rc.conf: # By default we filter the environment for our running scripts. To allow other # variables through, add them here. Use a * to allow all variables through. #rc_env_allow="VAR1 VAR2" Since the rc.conf setting is documented, I'm not sure what needs to be put in the runscript(8) man page.
(In reply to comment #10) > The following information is in /etc/rc.con=: > > # By default we filter the environment for our running scripts. To allow other > # variables through, add them here. Use a * to allow all variables through. > #rc_env_allow="VAR1 VAR2" > > Since the rc.conf setting is documented, I'm not sure what needs to be > put in the runscript(8) man page. Personally I'd preferred to have some reference in addition to comments configuration file. May be it's good idea to have rc.conf(5) manual page or at least to mention rc.conf comments in "SEE ALSO" section.