Folks, I wanna find a generic way to run a (simple bash) script on boot sequence of a router with embedded Linux. I have read about ways to do this on devices like:
- DD-WRT
- OpenWRT
- any NAS like D-Link DNS-323
But I was wondering if it could be done too on generic embedded devices, like a (mostly simple) DSL router. Possible reasons for doing this:
- Generic method of updating public IP of the device to DNS servers that allow it (I found some that allow it via simple http commands).
- Send any data to FTP server, like public IP of the device.
- Simple way to tell «The device is ON» to a remote host, like executing "telnet MySSHServer 22" to a SSH home server.
- Add network rules, ARP list, disable any network interface (ethx)... etc.
- Learning & Investigation ;-)
I have heard of some people doing this with some DSL router by keeping these steps:
- Save all router (including configuration) data to a firmware-like file.
- Edit that firmware file (i.e: modifying "/etc/rc.local" file).
- Restoring the modified firmware file to the router.
Is there a better way that anyone knows of?