+++ This bug was initially created as a clone of Bug #1542072 +++ Description of problem: * Syntax errors similar as in Bug 1533342 - post/S10selinux-label-brick.sh * Fix globbing problem when using grep for brick info files in both scripts Version-Release number of selected component (if applicable): How reproducible: Run scripts from commandline Steps to Reproduce: 1. /var/lib/glusterd/hooks/1/delete/pre/S10selinux-del-fcontext.sh --volname vol050-vg10 2. /var/lib/glusterd/hooks/1/create/post/S10selinux-label-brick.sh --volname vol050-vg10 Actual results: 1. ValueError: File context for /rhgs/vol050-vg10/brick01/fs(/.*)? is not defined 2. grep: /var/lib/glusterd/vols/vol050-vg10/bricks/*: No such file or directory Expected results: # /var/lib/glusterd/hooks/1/create/post/S10selinux-label-brick.sh --volname vol050-vg10 # semanage fcontext --list | grep rhgs /rhgs(/.*)? all files system_u:object_r:glusterd_brick_t:s0 /rhgs/vol050-vg10/brick01/fs\(/.*\)? all files system_u:object_r:glusterd_brick_t:s0 # /var/lib/glusterd/hooks/1/delete/pre/S10selinux-del-fcontext.sh --volname vol050-vg10 # semanage fcontext --list | grep rhgs /rhgs(/.*)? all files system_u:object_r:glusterd_brick_t:s0 --- Additional comment from Worker Ant on 2018-02-05 19:36:36 IST --- REVIEW: https://review.gluster.org/19502 (Bug 1542072 - syntactical errors in SELinux hooks) posted (#1) for review on master by --- Additional comment from Worker Ant on 2018-08-23 15:01:40 IST --- REVIEW: https://review.gluster.org/19502 (extras/hooks: syntactical errors in SELinux hooks, scipt logic improved) posted (#6) for review on master by Anoop C S --- Additional comment from Worker Ant on 2019-04-18 18:20:29 IST --- REVIEW: https://review.gluster.org/19502 (extras/hooks: syntactical errors in SELinux hooks, scipt logic improved) merged (#13) on master by Amar Tumballi
REVIEW: https://review.gluster.org/22594 (extras/hooks: syntactical errors in SELinux hooks, scipt logic improved) posted (#1) for review on release-6 by Anoop C S
REVIEW: https://review.gluster.org/22594 (extras/hooks: syntactical errors in SELinux hooks, scipt logic improved) merged (#2) on release-6 by Shyamsundar Ranganathan