Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wifichecker should only be active when WiFi dongle found #50

Open
elcojacobs opened this issue Mar 10, 2015 · 3 comments
Open

wifichecker should only be active when WiFi dongle found #50

elcojacobs opened this issue Mar 10, 2015 · 3 comments

Comments

@elcojacobs
Copy link
Member

The WiFi checker tries to activate wlan0 and prints errors when no WiFi module has been plugged in.
It would be better to check for the existance of the module and just exit silently when it cannot be found. Trying to do things against wlan0 when the module is not plugged in is silly.

Error in stderr:

wpa_supplicant: /sbin/wpa_supplicant daemon failed to start
run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1
Cannot find device "wlan0"
@elcojacobs elcojacobs changed the title make Wifichecker only active when WiFi dongle found wifichecker should only be active when WiFi dongle found Mar 10, 2015
@vanosg
Copy link
Collaborator

vanosg commented Mar 27, 2015

This is already the method by which you check to see if its plugged in - it appropriately logs an error, and quits. Would you rather just have it redirect the error message to /dev/null ?

It's possible to check via other methods, but it requires you knowing what the specific wifi card name is. For example, checking to see if a wifi card is connected by running lspci or lsusb would yield something like this;

Bus 005 Device 009: ID 12d1:140b Huawei Technologies Co., Ltd. EC1260 Wireless Data Modem HSD USB Card

We could make some educated guesses by searching for 'Wireless' or other keywords, but couldn't guarantee we could find all cards. By attempting to set wlan up, that already is the command that checks to see if it is connected and, if not present, returns that error. While it is good to have those errors in the logs for troubleshooting, we can just suppress it if you prefer. I think I fall on the side of leaving the error messsage in.

Perhaps a middleground would be a custom one-line error message instead?

@vanosg
Copy link
Collaborator

vanosg commented Apr 3, 2015

Use case just reported in the channel - the wlan0 error popped up, and led the user to determine that he had set the wrong IP address - by suppressing this error message, it likely would have taken a lot longer to determine the actual error

@m-mcgowan
Copy link
Contributor

@m-mcgowan m-mcgowan modified the milestone: Sprint 6 Apr 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants