dinsdag 16 december 2008

Torrents

The nice thing about routers running OpenWRT is the fact that you can run all kinds of software on the router. I used to run ctorrent on White Russian so I tried to instal l it on kamikaze as well.

Installation went smoothly, but the command ctorrent resulted in a "Bus error". It looked like libcrypto was to blame judging the output of the strace command.

To solve this I added another package repository at the top of /etc/ipkg.conf

src RC http://downloads.openwrt.org/kamikaze/8.09_RC1/brcm-2.4/packages/

So using the packages from the next release. The ctorrent package from this repository installs and runs fine on my kamikaze 7.09

Installation

After running OpenWRT White Russion for some years on my ASUS WL-500gDeluxe, it was time to upgrade to the kamikaze 7.09 release.

The upgrade went very smooth using the X-WRT interface, just upload the X-WRT based image and wait until the web page returns.

A USB disk is connected to my router which needs to be mounted and shared using NFS on my local (linux only) network.
Simply install

kmod-usb2
kmod-fs-nfsd
kmod-usb-storage
kmod-fs-ext3
e2fsprogs
portmap
nfs-kernel-server


To get the disc to mount we use a script /etc/init.d/usbdrive

#!/bin/sh /etc/rc.common
START=99
STOP=40
start()
{
echo -n "Testing USB Partition: "
e2fsck -p /dev/scsi/host0/bus0/target0/lun0/part1 &
sleep 5
echo -n "Mounting USB drive: "
mount -t ext3 -o noatime /dev/scsi/host0/bus0/target0/lun0/part1 /mnt/disc0_1
echo "Done."
}
stop()
{
echo -n "Umounting USB drive: "
sync
sync
umount /dev/scsi/host0/bus0/target0/lun0/part1
echo "Done."
}
restart()
{
stop
start
}