]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
macos: add anchors to synthetic.conf grep pattern
authorMarcio Barbosa <mbarbosa@sinenomine.net>
Fri, 7 Feb 2020 17:58:56 +0000 (14:58 -0300)
committerStephan Wiesand <stephan.wiesand@desy.de>
Fri, 14 Feb 2020 20:13:12 +0000 (15:13 -0500)
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.

Reviewed-on: https://gerrit.openafs.org/14062
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Yadavendra Yadav <yadayada@in.ibm.com>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 6d6a28720f4eae4652f2628fdfcc30983916f39d)

Change-Id: Iea837157a9eb5c066d577c705c445e10e244757d
Reviewed-on: https://gerrit.openafs.org/14068
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/packaging/MacOS/OpenAFS.post_install

index eb236bf497f553601f311516ad4692756c1abee3..ad6e70429dd60024f4b0dd146ef27c2d5598608a 100644 (file)
@@ -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