[pkg-wpa-devel] Bug#618277: PHASE mismatch in ifupdown script
Tormod Volden
debian.tormod at gmail.com
Wed Mar 16 12:19:02 UTC 2011
I agree that nowadays this is usually run through dbus and
network-manager and not the ifupdown and /etc/interfaces way, but the
result is the same. Please look at
/etc/NetworkManager/dispatcher.d/01ifupdown - it sets $PHASE and does
run-parts on the corresponding /etc/network/if-XXX.d directory.
So in your example above, when "run-parts: executing
/etc/network/if-down.d/wpasupplicant" is executed, $PHASE is set to
"down". And the "pre-down" clause can not be executed since there is
no if-pre-down.d file.
You do agree that any post-up and pre-down clauses in ifupdown.sh will
not be run, right? In some cases they will not be reached anyway
because do_start() and do_stop() /exit/ the whole script, but in some
cases do_start() and do_stop() simply /return/ and the script
continues into these "case $PHASE" clauses. Maybe this is not the
majority of user cases (and not yours) but in these cases I think
things are not working as intended. Or would you think these clauses
are never reached by anyone and should rather be removed?
> This process is started/stopped via D-Bus and has *nothing* to do with
> the ifupdown shell script glue you are doing your guesswork on.
If by "this process" you refer to wpa_supplicant, I corrected that in
the following message which you might have missed.
More information about the Pkg-wpa-devel
mailing list