I was wondering how tomato decides what to start when it boots, i can't find an init script anywhere.
You're going to have to go into a little more detail about what you need.
What router do you have?
Do you need bash to be the login shell or do you just need bash installed so you can run full fledged scripts?
Do you need to run bash before USB drives are mounted?
You can't have it run bash instead of busybox.
Bash doesn't exist in Tomato. Nor sh, nor ksh, nor zsh. Only busybox.
The router wasn't designed to be a full-blown computer. It was designed to be a small embedded system devoted to routing. So a lot of the generality of a desktop Linux is simple not there. For one thing, there's just no place to store large amounts of programs. Only a 4MB flash. And no memory to execute lots of big programs. Only 16MB of RAM.
If you want to do more stuff—which plenty of people doyou have to add a USB drive and install optware packages. You also need to take advantage of some of the usb hotplug script startup stuffwhich for now is totally undocumented. ;-( It's on my to-do list, though.
I have a usb drive, and optware installed, which is where bash is from, swap, aaand all I want to do is have bash run when I start an ssh session, i could actually care less what its doing otherwise. WL-520gU tomatoUSB EXT k24.