On the OpenWRT issue, I ended up hacking a solution up in Lua, which won't help the next time I encounter an issue with a limited BB in something that isn't OpenWRT. And, in a month I won't remember the tiny bit of Lua I learned, because this is the first and probably last time I'll be forced to use it.
Nothing against Lua, per se; I'd just prefer to keep working with ubiquitous standards for simple stuff, and use strongly typed compiled languages for anything nontrivial.