glusterfs/0003-fix-mount.glusterfs-Remove-from-grep-command.patch

41 lines
1.4 KiB
Diff
Raw Normal View History

From 42e3cb18f5d1f9692615e55c82e7a7c83f0f3a04 Mon Sep 17 00:00:00 2001
From: Anoop C S <anoopcs@cryptolab.net>
Date: Wed, 6 Dec 2023 16:32:24 +0530
Subject: [PATCH] mount.glusterfs: Remove `\` from grep command (#4275)
GNU grep v3.8 release notes[1] has the following mention about the usage
of backslahes:
"Regular expressions with stray backslashes now cause warnings, as their
unspecified behavior can lead to unexpected results."
As a result we see the warning "grep: warning: stray \ before -" during
script execution. Therefore remove the extra `\` from grep command.
Please note that this exact change was committed into mount_glusterfs.in
via 162d007dae167ec961b4a0970f6c37c6a2f9f641 but not here.
[1] https://savannah.gnu.org/forum/forum.php?forum_id=10227
Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
---
xlators/mount/fuse/utils/mount.glusterfs.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xlators/mount/fuse/utils/mount.glusterfs.in b/xlators/mount/fuse/utils/mount.glusterfs.in
index 6c9ff7a..c1cf17b 100755
--- a/xlators/mount/fuse/utils/mount.glusterfs.in
+++ b/xlators/mount/fuse/utils/mount.glusterfs.in
@@ -839,7 +839,7 @@ EOF
}
}
- grep_ret=$(echo ${mount_point} | grep '^\-o');
+ grep_ret=$(echo ${mount_point} | grep '^-o');
[ "x" != "x${grep_ret}" ] && {
cat <<EOF >&2
ERROR: -o options cannot be specified in either first two arguments..
--
2.27.0