Skip to content

wifichecker should only be active when WiFi dongle found #50

Open

Description

@elcojacobs

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"

Activity

  1. changed the title [-]make Wifichecker only active when WiFi dongle found[/-] [+]wifichecker should only be active when WiFi dongle found[/+] on Mar 10, 2015
  2. vanosg commented on Mar 27, 2015

    @vanosg
    Collaborator

    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?

  3. vanosg commented on Apr 3, 2015

    @vanosg
    Collaborator

    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

  4. m-mcgowan commented on Apr 14, 2015

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions