within /etc/init.d/mldonkey wget is use do communicat with mlnet. There are line like wget --spider http://$DONKSRV:4080/submit?q=close_fds -q and lines like wget --spider http://localhost:${MLPORT}/submit?q=set+max_hard_download_rate+${MLLOWDOWN} -q The variable $MLPORT is defined in /etc/conf.d/mldonkey. It's default value is 4080. The variable DONKSRV _is not_ defined in /etc/conf.d/mldonkey. The start/stop script should either consistently use http://localhost:${MLPORT} or http://$DONKSERV:{$MLPORT} The 2nd alternative is mor flexible because it allows definitions like DONKSERV=username:password@localhost in /etc/conf.d/mldonkey. Using DONKSERV this way lets "/etc/init.d/mldonkey slow" and "/etc/init.d/mldonkey fast" work in case you don't use the default user (admin, empty password) to communicate with mlnet. OK, this method also isn't very secure but might be acceptable on desktop environments
Created attachment 16465 [details] corrected and improved start script fixed inconsistency and added support for user/password
Created attachment 16466 [details] corresponding config file varnames changed, includes now option for username+password
now in portage (same ebuild)