From 6d6a28720f4eae4652f2628fdfcc30983916f39d Mon Sep 17 00:00:00 2001 From: Marcio Barbosa Date: Fri, 7 Feb 2020 14:58:56 -0300 Subject: [PATCH] macos: add anchors to synthetic.conf grep pattern The grep pattern that checks if /etc/synthetic.conf already has an entry for afs is intended to check if this file holds a single column entry named afs. Unfortunately, the current version does not completely enforce this restriction. To fix this problem, add anchors to the grep pattern in question. Change-Id: I15a1fa1c250027b7d3ab67e686cbfbae853251a2 Reviewed-on: https://gerrit.openafs.org/14062 Reviewed-by: Michael Meffie Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Yadavendra Yadav Reviewed-by: Cheyenne Wills Reviewed-by: Benjamin Kaduk --- src/packaging/MacOS/OpenAFS.post_install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/packaging/MacOS/OpenAFS.post_install b/src/packaging/MacOS/OpenAFS.post_install index eb236bf..ad6e704 100644 --- a/src/packaging/MacOS/OpenAFS.post_install +++ b/src/packaging/MacOS/OpenAFS.post_install @@ -8,7 +8,7 @@ if [ $majorvers -ge 19 ]; then # Root mount point is read-only. To workaround this restriction, add a # synthetic entity for afs into /etc/synthetic.conf. For more information, # please read man synthetic.conf(5). - grep -wqs 'afs' /etc/synthetic.conf || echo 'afs' >> /etc/synthetic.conf + grep -qs '^afs$' /etc/synthetic.conf || echo 'afs' >> /etc/synthetic.conf elif [ $majorvers -ge 7 ]; then # /Network is now readonly, so put AFS in /afs; make sure /afs is a directory if [ -e /afs ]; then -- 1.9.4