Problem with ifupdown script
Cameron Hutchison
lists at xdna.net
Tue Jun 1 00:00:03 UTC 2010
Josef Wolf <jw at raven.inka.de> writes:
> #! /bin/sh
> # this is /etc/network/if-up.d/myifup
> [ x$IFACE = xeth0 ] && ifdown --force wlan0
> exit 0
> #! /bin/sh
> # this is /etc/network/if-down.d/myifup
> [ x$IFACE = xeth0 ] && ifup --force wlan0
> exit 0
You're trying to call ifupdown recursively, and from my experience it
does not like that. You need to delay the call to ifupdown in your
scripts:
echo "ifdown --force wlan0 >/dev/null 2>&1" | at now
or if you have bash:
at now <<<"ifdown --force wlan0 >/dev/null 2>&1"
This may not be your actual problem. My use case was bring up a VPN
connection with ifupdown when the WAN connection came up. The above
delay solved it for me.
More information about the ubuntu-users
mailing list