Skip to content

Commit

Permalink
fix getting wifi ssid on ubuntu
Browse files Browse the repository at this point in the history
on ubuntu and probably other systems, /bin/sh does not support `-o pipefail`

closes greshake#280
  • Loading branch information
mathroc committed Oct 8, 2018
1 parent 735b211 commit c90090b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/blocks/net.rs
Expand Up @@ -96,8 +96,7 @@ impl NetworkDevice {
&[
"-c",
&format!(
"iw dev {} link | grep \"^\\sSSID:\" | sed \"s/^\\sSSID:\\s//g\"",
self.device
"ssid=\$(iw dev {} link | grep \"^\\sSSID:\" | sed \"s/^\\sSSID:\\s//g\"); [ \$ssid -eq "" ] && ssid=\$(nmcli -g general.connection device show {}); echo \$ssid", self.device
),
],
)
Expand Down

0 comments on commit c90090b

Please sign in to comment.