summaryrefslogtreecommitdiffstats
path: root/src/connections/ethernet
diff options
context:
space:
mode:
Diffstat (limited to 'src/connections/ethernet')
-rw-r--r--src/connections/ethernet4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/connections/ethernet b/src/connections/ethernet
index 834b333..b33dfbd 100644
--- a/src/connections/ethernet
+++ b/src/connections/ethernet
@@ -45,8 +45,8 @@ ethernet_up() {
[[ -z "$WPA_DRIVER" ]] && WPA_DRIVER="wired"
# Set wpa_supplicant control path (FS#25473)
WPA_CTRL_PATH=/run/wpa_supplicant
- if grep "^ *ctrl_interface=" "$WPA_CONF" &>/dev/null; then
- WPA_CTRL_PATH=$(grep -m 1 "^ *ctrl_interface=" "$WPA_CONF" | tail -n 1 | cut -d= -f 2- | sed -r 's/DIR=(.*) +GROUP=.*/\1/')
+ if grep -q "^ *ctrl_interface=" "$WPA_CONF"; then
+ WPA_CTRL_PATH=$(grep -m 1 "^ *ctrl_interface=" "$WPA_CONF" | cut -d= -f 2- | sed -r 's/^DIR=(.*) GROUP=.*/\1/')
fi
report_debug ethernet_up start_wpa "$INTERFACE" "$WPA_CONF" "$WPA_DRIVER" "$WPA_OPTS"