OpenWrt Forum Archive

Topic: Hotplug and ifup wan using DDNS wiki tutorial

The content of this topic has been archived on 19 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I am trying to follow the tutorial http://wiki.openwrt.org/DDNSHowTo#head- … b1e8cbf116 and do not seem to be having success with hotplug.

I am using RC4.  So I create a directory under /etc/hotplug.d called wan.  CD into /etc/hotplug.d/wan and "touch 15-initpptp".  The idea here is that my pptp connection will be established every time the wan comes up.

It doesn't seem like hotplug is being called, because my pptp connection doesn't come up.

So I modified my /etc/hotplug/wan/15-initpptp to look like this:

[ "$ACTION" = "ifup" -a "$INTERFACE" = "wan" ] && echo "testing" >> /tmp/hogpluglog &

but it doesn't even do that when I do ifdown wan && ifup wan.

What am I doing wrong?

t0ksik wrote:

I am using RC4.  So I create a directory under /etc/hotplug.d called wan.  CD into /etc/hotplug.d/wan and "touch 15-initpptp".  The idea here is that my pptp connection will be established every time the wan comes up.

If you really have RC4 installed than you should have 3 directories called {iface,net,usb} in the /etc/hotplug.d/ directory.

The hotplug script (15-ez-ipupdate) should be in /etc/hotplug.d/iface and not in a wan directory.

Please try again.

it had net and usb, but no iface.  I assumed that iface was a wildcard but apparently not.

Not that it really matters now.  I didn't realize that hotplug was only for static connections.  I started looking at /sbin/hotplug and  /etc/functions.sh and saw the comment about hotplug not being for dhcp connections.  If I had read just a little bit more I could have saved everyone the trouble.  Thanx.

I modified my /usr/share/udhcpc/default.script and it is doing what I want.  Thanx smile

The discussion might have continued from here.