-
Notifications
You must be signed in to change notification settings - Fork 83
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
Comments
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? |
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 |
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:
The text was updated successfully, but these errors were encountered: