Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#13383 - [mldonkey] Add option to pass additional arguments to mlnet

Attached to Project: Community Packages
Opened by Denis Yantarev (denn) - Thursday, 19 February 2009, 19:23 GMT
Last edited by Corrado Primier (bardo) - Tuesday, 14 July 2009, 15:29 GMT
Task Type Feature Request
Category
Status Closed
Assigned To Corrado Primier (bardo)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

It would be nice to be able to pass additional command line options to mlnet daemon in rc script. To do so we can add PARAMS variable to conf.d/mldonkey and pass it to mlnet at startup. Proposed patch is attached.
This task depends upon

Closed by  Corrado Primier (bardo)
Tuesday, 14 July 2009, 15:29 GMT
Reason for closing:  Fixed
Additional comments about closing:  The only remaining issue of log files has been solved in mldonkey-3.0.0-3, that I just uploaded for x86_64 and will upload for i686 in a short while. I found and added the '-log_to_syslog' option to /etc/rc.d/mldonkey, now they are managed by syslog-ng.
Comment by Corrado Primier (bardo) - Saturday, 28 February 2009, 23:52 GMT
Sorry man, in the rush of upgrading to 3.0.0 because of the big security hole of previous versions, I forgot about this FR. I'll do it in the next few days, I hope.
Comment by Denis Yantarev (denn) - Sunday, 01 March 2009, 09:36 GMT
Not sure if it's worth adding another task here, but it would be also very nice to be able to change location of pid file for mldonkey. Idea is that after unclear system reboot (power failure for instance) pid file in mldonkey home is not removed during the boot, so daemon fails to start until you clean it up manually. If put to somewhere in /var/run it will be deleted automatically. So here is the patch including both configurable params and pid.
Comment by Corrado Primier (bardo) - Sunday, 01 March 2009, 23:26 GMT
I actually like this idea a lot. Just a question: why did you rename $pidfile in $PID? I don't think it makes much sense, since the variable doesn't contain a PID, but just the path to the file where the PID is stored.
No need to open another task, I can manage everything from here. Just be sure to send in other great ideas before I close this one, if they come to your mind ;-)

BTW, the way I get the user's home directory is fugly and slow:
$(su $MLDUSER -s /bin/sh -c 'echo $HOME')
I think I'll change it in the more elegant and twenty-times-faster:
$(getent passwd $MLDUSER | cut -d: -f6)
Comment by Denis Yantarev (denn) - Monday, 02 March 2009, 06:05 GMT
I agree, $PIDFILE is much more appropriate here than $PID. Just wanted to change variable name to something uppercase to make conf.d/mldonkey contents uniform. Also probably it makes sense to change default pid file location to one within /var/run.

Another idea in this vein would be to move log file to /var/log. :)
Comment by Corrado Primier (bardo) - Saturday, 18 April 2009, 16:50 GMT
I finally got to this task again and I'm rebuilding now. If tests are ok I'm uploading the new package soon.

The whole PIDFILE thing had to be implemented a bit differently, and logs withing /var/log can't be done at all, both for the same reason: mldonkey drops privileges, so it can't write to these directories. The pid file can happily go to /var/lock (this is the reason it exists, by the way), for the log file there's nothing you can do.
Also, I chose to allow the user to set PIDDIR instead of PIDFILE since this is the parameter mldonkey takes, the filename is always 'mlnet.pid', so it made no sense to specify a filename which would have been treated like a directory anyway, and with funny effects =)
Comment by Denis Yantarev (denn) - Sunday, 19 April 2009, 09:06 GMT
Not sure if it is a valid solution for logging problem, but why not create /var/log/mldonkey dir and chown it to $MLDUSER?
Comment by Corrado Primier (bardo) - Monday, 20 April 2009, 15:44 GMT
I'm afraid this isn't ok: all log files (including the ones in subdirectories of /var/log) are owned by root, while occasionally belonging to another group. Furthermore, this group is *never* a user group: usually it's the 'log' group, but sometimes you can find other system groups. There's no solution for log files at the current state of things.
After all, if you think about it, mldonkey doesn't supply a system daemon, we "implement" it through the rc.d script, but there's no support on the program's side.

Loading...