The Update

DISCLAIMER: This walkthrough is solely for my reference. If you fuck-up anything doing it, you are on your own ! Love, peace and best wishes.

Back to revival

MLdonkey

Is in the optware feed. You have to enable the native sources. Login to the ds106 with user root. Check and install mldonkey with the commands below.

Poseidon> ipkg list|grep mldonkey
mldonkey - 3.0.0-1 - A multi-platform, multi-network peer-to-peer client.
Poseidon> ipkg install mldonkey
Installing mldonkey (3.0.0-1) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/ds101g/native/unstable/mldonkey_3.0.0-1_powerpc.ipk
Installing bzip2 (1.0.5-1) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/ds101g/cross/unstable/bzip2_1.0.5-1_powerpc.ipk
Installing file (5.03-1) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/ds101g/cross/unstable/file_5.03-1_powerpc.ipk
Configuring bzip2
update-alternatives: Linking //opt/bin/bzip2 to /opt/bin/bzip2-bzip2
Configuring file
Configuring mldonkey
Successfully terminated.

Run the commands

mkdir /volume1/.mldonkey
ln -s /volume1/.mldonkey /root/.mldonkey

Start the mldonkey by typing mlnet.byte
Wait until you see the message [dMain] Core started
Use CTRL+C to terminate the mldonkey
By now the files in the /volume1/.mldonkey directory are created.
Use the command vi /volume1/.mldonkey/downloads.ini to enable connecting to the core.
Press /
Type allowed_ips =
Press N till you reach a line where only the text " allowed_ips = [" text is located (withoud the quotes).
Press SHIFT + $
Press a
Press ENTER
Now you have to type the IP of your ds106. Instead of the last number in your IP you type 0/24 so for me since my IP is 192.168.3.29 the typed string was "192.168.3.0/24"; (with the quotes and the dot-comma)
Press ESC
Type :wq!
You have edited the downloads.ini file. The part with the allowed IP's should look similar to the excerpt below.

          example for ini-file: allowed_ips = [ "127.0.0.0/8"; "192.168.1.2";]
          CIDR and range notations are supported: ie use 192.168.0.0/24
          or 192.168.0.0-192.168.0.255 for 192.168.0.* *)
 allowed_ips = [
  "192.168.3.0/24";
  "127.0.0.1";
]

        (* port for Graphical Interfaces, 0 to deactivate GUI interface *)
        (* changing this option requires restart of MLDonkey core *)

To create the start/stop script issue the command vi /opt/etc/init.d/S80mlnet
Press i
Copy/paste the script below (select the script and use the right mouse button to paste it into the putty window)

# Now on to usual bussines
MLNET=/opt/bin/mlnet.byte
NAME=S80mlnet
DESC="mldonkey p2p client"
RUNMLNET=no
STARTDIR=/root/.mldonkey
LOGFILE=/dev/null
CRONTAB=/etc/crontab
PASSWORD="";
# Include mlnet defaults if available
if [ -f /opt/etc/default/$NAME ] ; then
    . /opt/etc/default/$NAME
fi
if [ "$RUNMLNET" != "yes" ];then
  echo "$NAME not to be started. Edit /opt/etc/default/$NAME first."
  exit 1
fi
set -e
case "$1" in
  start)
    if pidof mlnet.byte > /dev/null 2>&1
    then
      echo -n "$DESC already running: "
    else
      echo -n "Starting $DESC: "
      cd $STARTDIR
      rm -f *.tmp
      $MLNET > $LOGFILE 2>&1 &
      # add the softstop routine to crontab
      sed -i -e "/$NAME softstop$/d" $CRONTAB
      echo -e "0\t*\t*\t*\t*\troot\t/opt/etc/init.d/$NAME softstop" >> $CRONTAB
      sed -i -e '/^\s*$/d' $CRONTAB
      pidof crond|xargs kill -9
      crond -S -b
    fi
    echo "$NAME."
  ;;
  softstop)
    echo -n "Checking downloads "
    wget -O "$NAME.tmp" -q "http://admin:${PASSWORD}@127.0.0.1:4080/submit?q=vd"
    if grep -q '<td class="dl al np">R</td>' "$NAME.tmp"
    then
      echo "and can't stop because downloads are running !"
    else
      echo -n "and stopping $DESC: "
      echo "$MLNET" | awk -F/ '{print $NF}' | xargs pidof | xargs kill -9
      echo "$NAME."
      # remove the softstop routine invokation
      sed -i -e '/$NAME softstop$/d' $CRONTAB
      pidof crond|xargs kill -9
      crond -S -b
    fi
    rm "$NAME.tmp"
  ;;
  stop)
    echo -n "Stopping $DESC: "
    echo "$MLNET" | awk -F/ '{print $NF}' | xargs pidof | xargs kill -9
    echo "$NAME."
    # remove the softstop routine invokation
    sed -i -e '/S80mlnet softstop$/d' $CRONTAB
    pidof crond|xargs kill -9
    crond -S -b
  ;;
  restart|force-reload)
    echo -n "Restarting $DESC: "
    echo "$MLNET" | awk -F/ '{print $NF}' | xargs pidof | xargs kill -9
    sleep 1
    cd $STARTDIR
    $MLNET > $LOGFILE 2>&1 &
    echo "$NAME."
  ;;
  *)
    N=/opt/etc/init.d/$NAME
    echo "Usage: $N {start|stop|restart|force-reload}" >&2
    exit 1
  ;;
esac
exit 0

Now press the escape key ESC and type :wq! to save the script
Change the attributes chmod 0755 the /opt/etc/init.d/S80mlnet so it is possible to run the script. It will be run automagically by the rc.optware script at every startup.
Create the default script echo "RUNMLNET=yes" > /opt/etc/default/S80mlnet. If you ever replace the yes in the /opt/etc/default/S80mlnet file it will stop starting the mldonkey.
Now the start/stop script is ready

Download the Sancho GUI for mldonkey and install it. After the first start you have to configure it. The picture might help. There is a 99.99% chance that your IP is different.

syno_011_sancho.PNG

This is how the web interface looks like, point your browser to http:/ /<ip-of-your-ds106-nas>:4080/

syno_012_mlnet.PNG

Back to revival

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.