Skip to content

Problem with wireless card detection #1

Description

@kozliatko
wlp1s0    Link encap:Ethernet  HWaddr 44:03:2c:9d:81:b8  
          inet addr:10.0.0.113  Bcast:10.0.0.255  Mask:255.255.255.0
          inet6 addr: fe80::e6d4:d75d:d152:dcb0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:472967 errors:0 dropped:0 overruns:0 frame:0
          TX packets:254140 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:299563101 (299.5 MB)  TX bytes:60382595 (60.3 MB)

gwen wifi-channel-watcher # ./channel-watch 
Wifi interface appears to be inactive.  Using a Pi?
For troubleshooting: https://github.com/angela-d/wifi-channel-watcher/wiki/Troubleshooting

I think it's because you assume a fixed number of columns, but Network name can contain more fields


gwen wifi-channel-watcher # nmcli con show --active
NAME           UUID                                  TYPE             DEVICE 
Auto slniecko  561a7513-cd9b-4887-8a6b-15ebeeaa4293  802-11-wireless  wlp1s0 
vpn0           09273c1c-a70e-4d5f-a371-e2b6a247b443  tun              vpn0   

and your script looks at position $3

# wifi active?
if [ "$(nmcli con show --active | awk '$3 ~ "wifi"')" == "" ];

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions