/etc/network/if-up.d/wpasupplicant throws error in invocation

Bug #659808 reported by Torsten Spindler
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
wpasupplicant (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

Binary package hint: wpasupplicant

The error is about unknown mode:

$ sudo ./wpasupplicant
wpa_supplicant: unknown mode: ""

$ sudo sh -x /etc/network/if-up.d/wpasupplicant
+ [ -n ]
+ [ = lo ]
+ [ -n ]
+ WPA_IFACE=
+ [ -f /etc/wpa_supplicant/functions.sh ]
+ . /etc/wpa_supplicant/functions.sh
+ WPA_SUP_BIN=/sbin/wpa_supplicant
+ WPA_SUP_PNAME=wpa_supplicant
+ WPA_SUP_PIDFILE=/var/run/wpa_supplicant..pid
+ WPA_CLI_BIN=/sbin/wpa_cli
+ WPA_CLI_PNAME=wpa_cli
+ WPA_CLI_PIDFILE=/var/run/wpa_action..pid
+ WPA_CLI_LOGFILE=/var/log/wpa_action..log
+ WPA_CLI_TIMESTAMP=/var/run/wpa_action..timestamp
+ WPA_CLI_IFUPDOWN=/var/run/wpa_action..ifupdown
+ [ -d /lib/init/rw/sendsigs.omit.d/ ]
+ WPA_SUP_OMIT_PIDFILE=/lib/init/rw/sendsigs.omit.d/wpasupplicant.wpa_supplicant..pid
+ WPA_CLI_OMIT_PIDFILE=/lib/init/rw/sendsigs.omit.d/wpasupplicant.wpa_action..pid
+ [ -z ]
+ WPA_CTRL_DIR=/var/run/wpa_supplicant
+ [ -n ]
+ [ = 1 ]
+ TO_NULL=/dev/null
+ DAEMON_VERBOSITY=--quiet
+ [ ! -x /sbin/wpa_supplicant ]
+ [ ! -x /sbin/wpa_cli ]
+ wpa_msg stderr unknown mode: ""
+ [ -n ]
+ shift
+ echo wpa_supplicant: unknown mode: ""
wpa_supplicant: unknown mode: ""
+ exit 1

It seems the wpasupplicant script must be called with an environment variable of MODE, stating either start or stop. For the script there also seems to the PHASE variable to be of importance. These don't seem to be set when calling from if-up or if-down.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

When /etc/network/if-up.d/wpasupplicant is called from ifupdown, the MODE and PHASE variables are set, see man interfaces(5). You can for instance add
 logger "wpasupplicant: $IFACE $ADDRFAM $MODE $PHASE"
to the script and check the result in /var/log/syslog.

However I have discovered that PHASE is "up" (probably because the script is in the if-up.d directory) but the script checks for "post-up" so I wonder if init_wpa_cli is ever called.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

I filed the above PHASE mismatch here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=618277

Revision history for this message
Maarten Bezemer (veger) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. We are sorry that we do not always have the capacity to look at all reported bugs in a timely manner. There have been many changes in Ubuntu since that time you reported the bug and your problem may have been fixed with some of the updates. It would help us a lot if you could test it on a currently supported Ubuntu version. When you test it and it is still an issue, kindly upload the updated logs by running apport-collect 659808 and any other logs that are relevant for this particular issue.

Changed in wpasupplicant (Ubuntu):
status: New → Incomplete
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.