summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJouke Witteveen <j.witteveen@gmail.com>2012-07-08 11:42:54 +0200
committerJouke Witteveen <j.witteveen@gmail.com>2012-07-08 11:42:54 +0200
commit5511dc38c484d93fda0aaf57e30e6b82f8174918 (patch)
tree0ea942d132d85a85357b2094c81792a5b2a8b377 /src
parent3d9c37274e5b9bb620a7fd1ea24071aeed06deee (diff)
downloadnetctl-5511dc38c484d93fda0aaf57e30e6b82f8174918.tar.gz
netctl-5511dc38c484d93fda0aaf57e30e6b82f8174918.tar.xz
Use grep instead of fgrep (FS#30598)
Direct invocation as fgrep is deprecated.
Diffstat (limited to 'src')
-rw-r--r--src/8021x8
-rw-r--r--src/connections/ethernet2
-rw-r--r--src/network2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/8021x b/src/8021x
index 9c8e226..ce20c36 100644
--- a/src/8021x
+++ b/src/8021x
@@ -28,9 +28,9 @@ wpa_check()
while (( timeout < TIMEOUT )); do
( # Sometimes wpa_supplicant isn't ready so silence errors for 2s only to avoid hiding real errors
if (( timeout < 2 )); then
- eval $(wpa_call "$INTERFACE" status 2> /dev/null | fgrep "wpa_state=")
+ eval $(wpa_call "$INTERFACE" status 2> /dev/null | grep -F "wpa_state=")
else
- eval $(wpa_call "$INTERFACE" status | fgrep "wpa_state=")
+ eval $(wpa_call "$INTERFACE" status | grep -F "wpa_state=")
fi
[[ "$wpa_state" = "$CONDITION" ]]
) && return 0
@@ -125,7 +125,7 @@ wpa_supplicant_scan_and_find() {
for ((try=0; try < $RETRIES; try++)); do
local found
sleep 2
- found=$(wpa_call "$INTERFACE" scan_results | tail -n+2 | cut -f ${FIELD} | fgrep -x -m 1 "${ITEM}")
+ found=$(wpa_call "$INTERFACE" scan_results | tail -n+2 | cut -f ${FIELD} | grep -F -x -m 1 "${ITEM}")
(( $? == 0 )) && scan_ok=1
# ITEM has been found, echo it
@@ -164,7 +164,7 @@ wpa_supplicant_scan_info() {
# Wait at least 3 seconds for scan results
sleep 3
# Sometimes, that is not enough (FS#29946)
- timeout_wait 7 '! wpa_call "$INTERFACE" status | fgrep -q "wpa_state=SCANNING"'
+ timeout_wait 7 '! wpa_call "$INTERFACE" status | grep -F -q "wpa_state=SCANNING"'
wpa_call "$INTERFACE" scan_results |
grep -v "^Selected" |
grep -v "^bssid" |
diff --git a/src/connections/ethernet b/src/connections/ethernet
index e9ff67f..0a70f5d 100644
--- a/src/connections/ethernet
+++ b/src/connections/ethernet
@@ -18,7 +18,7 @@ ethernet_up() {
SYSCTL_INTERFACE="${INTERFACE/.//}"
if [[ ! -e "/sys/class/net/$INTERFACE" ]]; then
- if ! echo "$INTERFACE" | fgrep -q ":"; then
+ if ! echo "$INTERFACE" | grep -F -q ":"; then
report_iproute "Interface $INTERFACE does not exist"
fi
fi
diff --git a/src/network b/src/network
index 91dc49c..639de1b 100644
--- a/src/network
+++ b/src/network
@@ -331,7 +331,7 @@ set_iface() {
is_interface() {
local INTERFACE="$1"
if [[ ! -e "/sys/class/net/$INTERFACE" ]]; then
- if ! echo "$INTERFACE" | fgrep -q ":"; then
+ if ! echo "$INTERFACE" | grep -F -q ":"; then
return 1
fi
fi