Currently, init.d script provided with rtorrent uses simple /home/$USER to set homedir for rtorrent. In some more complex configurations it's possible that user running rtorrent has homedir outside /home (e.g. in /srv). I think we should instead use passwd to determine the real homedir. As I wasn't able to find any standard tool allowing to easily get that information within one command call, I decided to use getent+awk, which should work fine. AFAICS gawk is part of system set even of BSD, so using it shouldn't cause any trouble, I think. But getent is part of glibc, so I'm not sure what to do about it (2>/dev/null ? [ -x … ] ?). I assumed that if for some reason getent+awk return empty string, we fallback to old /home/$USER behavior.
Created attachment 188207 [details, diff] Patch for the initscript
(In reply to comment #1) > Created an attachment (id=188207) [edit] > Patch for the initscript > Nice, thx. No version bump here though. I don't know about fbsd either, I guess I will re-evaluate when someone suggests a fix (or complains).