Log in

Bekijk de volledige versie : Installing programs to flash?



RDF
18-11-2009, 11:42
Possibly a stupid question, but I can't figure this out and searching made me more dumb...

I would like to install knockd (http://www.zeroflux.org/projects/knock). It's available through ipkg, but I don't want it to dependent on external storage devices. I would like to use knockd all the time. So how do I install knockd on the ASUS?
Is it possible to just copy the binary from ipkg to the flash or do I have to compile it myself. And if I have to compile do I need to compile the whole Oleg distribution?

al37919
18-11-2009, 12:26
You can take it here: http://ipkg.nslu2-linux.org/feeds/unslung/wl500g/knock_0.5-2_mipsel.ipk It is renamed tar.gz file

This package is compiled using the same toolchain as Oleg's original firmware. So, if your device has enough space in flashfs you can just put binary from it to flashfs, save and use.

RDF
18-11-2009, 21:25
You can take it here: http://ipkg.nslu2-linux.org/feeds/unslung/wl500g/knock_0.5-2_mipsel.ipk It is renamed tar.gz file

This package is compiled using the same toolchain as Oleg's original firmware. So, if your device has enough space in flashfs you can just put binary from it to flashfs, save and use.

Thanks! It works!

Here's what I did:

downloaded the knockd ipkg http://ipkg.nslu2-linux.org/feeds/unslung/wl500g/knock_0.5-2_mipsel.ipk & extracted the tar.gz
moved knock and knockd binaries to /usr/local/sbin (first I tried /usr/sbin/ but I got an error saying that the filesystem is read only. I really don't know if /usr/local/sbin is the right place for knockd, but that's where I could write and that's where other user scripts are located)
I moved knockd.conf to /usr/local/etc
Edited knockd.conf to suit my needs. Most important change was replacing "iptables -A INPUT" with "iptables -I INPUT" to make sure the iptables rule gets at the beginning of the list.
I decided to dump the man-pages and the init.d script (don't really need them)
I made sure knockd is run at boot by appending this to /usr/local/sbin/post-firewall
# launch knockd on the WAN port
/usr/local/sbin/knockd --daemon --interface eth1 --config /usr/local/etc/knockd.conf
Saved everything to flash
$ flashfs save && flashfs commit && flashfs enable && reboot