On 07/12/12 10:40, Jo-Philipp Wich wrote:
Use hotplug to trigger tasks like that, example:
# /etc/hotplug.d/iface/90-upnpc:
Many thanks Jo-Philipp!
I've been looking around the site but have not yet found documentation for "this
sort of thing" - any hints?
. /lib/functions/network.sh
if [ "$ACTION" = ifup ] && [ "$INTERFACE" != lo ]; then
I have changed this to:
if [ "$ACTION" = ifup ] && [ "$INTERFACE" = lan ]; then
as otherwise it seemed to be doing it to the loopback (127.0.0.1) interface as
well.
However...
I still have to have a "sleep" in the script - otherwise it does not find
a valid IGD. It seems to need about ten or a bit more seconds, but I am
giving it 60 to be on the safe side.
Also, I am back to logging in /tmp:
/usr/bin/upnpc -a "$ipaddr" 1234 1234 tcp >> /tmp/pnpc.log
as I am not sure how to use logger to capture all the output of upnpc - if I use
backticks I get just the first line.
Another question on upnpc - when it does work, the "Application Name" in the
router's port forwarding table lists "miniupnpc". I would like to change
this to a string of my choosing (e.g. "AskDomAboutThis" would be good...)
Is this possible? I'll recompile if I have to. OTOH I might just hack the
binary with a text editor - I assume if it's the same length string it
will work fine!
regards
Dom
_______________________________________________
openwrt-users mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-users