Replaced fgrep by grep -F

This commit is contained in:
Thomas Schmitt 2019-12-03 21:41:17 +01:00
parent f7f484de20
commit 3bf01c109d
1 changed files with 6 additions and 6 deletions

View File

@ -279,7 +279,7 @@ plug_in_watcher() {
else else
for i in $new_device_list for i in $new_device_list
do do
if echo "$old_device_list" | fgrep -v ' '"$i"' ' >/dev/null if echo "$old_device_list" | grep -F -v ' '"$i"' ' >/dev/null
then then
found_devices="$found_devices $i" found_devices="$found_devices $i"
fi fi
@ -362,7 +362,7 @@ list_devices() {
if echo "$name" | grep '^mmcblk[0-9]' >/dev/null if echo "$name" | grep '^mmcblk[0-9]' >/dev/null
then then
transports="mmcblk" transports="mmcblk"
elif echo "$name" | fgrep "/" >/dev/null elif echo "$name" | grep -F "/" >/dev/null
then then
echo "NOTE: The device name must not contain '/' characters" >&2 echo "NOTE: The device name must not contain '/' characters" >&2
transports=not_an_expected_name transports=not_an_expected_name
@ -388,7 +388,7 @@ list_devices() {
then then
dummy=dummy dummy=dummy
else else
if echo "$reasons" | fgrep -v "not_usb" >/dev/null if echo "$reasons" | grep -F -v "not_usb" >/dev/null
then then
reasons="${reasons}not_usb- " reasons="${reasons}not_usb- "
fi fi
@ -419,21 +419,21 @@ list_devices() {
if test "$fstype" = "iso9660" if test "$fstype" = "iso9660"
then then
has_iso=y has_iso=y
if echo "$good_fs" | fgrep -v "has_$fstype" >/dev/null if echo "$good_fs" | grep -F -v "has_$fstype" >/dev/null
then then
good_fs="${good_fs}has_${fstype}+ " good_fs="${good_fs}has_${fstype}+ "
fi fi
elif test "$fstype" = "vfat" elif test "$fstype" = "vfat"
then then
has_vfat=y has_vfat=y
if echo "$good_fs" | fgrep -v "has_$fstype" >/dev/null if echo "$good_fs" | grep -F -v "has_$fstype" >/dev/null
then then
good_fs="${good_fs}has_${fstype}+ " good_fs="${good_fs}has_${fstype}+ "
fi fi
elif test -n "$fstype" elif test -n "$fstype"
then then
has_other=y has_other=y
if echo "$bad_fs" | fgrep -v "has_$fstype" >/dev/null if echo "$bad_fs" | grep -F -v "has_$fstype" >/dev/null
then then
bad_fs="${bad_fs}has_${fstype}- " bad_fs="${bad_fs}has_${fstype}- "
fi fi