summaryrefslogtreecommitdiffstats
path: root/extras/hook-scripts/create
Commit message (Collapse)AuthorAgeFilesLines
* extras/hooks: Fix getopt usageAnoop C S2017-10-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | `getopt` does not have an optional argument as '-name'. It should be either '-n' or '--name'(see man getopt(1)). This wrong usage resulted in setting the script name as 'ame' instead of $PROGNAME in most of the hook-scripts. Additionally the following line from DESCRIPTION given for `getopt` shell command expects short options for almost every kind of usage mentioned in SYNOPSIS: . . . If no '-o' or '--options' option is found in the first part, the first parameter of the second part is used as the short options string. . . . Refer http://man7.org/linux/man-pages/man1/getopt.1.html for more clarity on its usage. Change-Id: I95baf5fa8c99025e66b2d83656dd838d4f6048ce BUG: 1503983 Signed-off-by: Anoop C S <anoopcs@redhat.com>
* extras/hooks: Fix errors reported via shellcheck utilityAnoop C S2017-10-181-2/+2
| | | | | | Change-Id: I217c6b2a39955f1709bb3452b00d33c2dcb60faa BUG: 1500649 Signed-off-by: Anoop C S <anoopcs@redhat.com>
* extras/hookscripts: non-portable shell syntaxKaleb S. KEITHLEY2017-06-021-2/+2
| | | | | | | | | | | | | | use of "function" is not portable to other shells Reported-by: Patrick Matthäi <pmatthaei@debian.org> Change-Id: I13a0482b387cc3b7a7a57df424e673850603da37 BUG: 1457812 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: https://review.gluster.org/17443 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org>
* extras/hook-scripts: SELinux brick file context management scriptsBrian Foster2017-05-013-0/+68
The SELinux policy for gluster defines the glusterd_brick_t type to support server side SELinux (e.g., server side labels). Add convenience hook scripts that users/packagers can install to ensure that new bricks are labeled correctly. The volume create hook script adds a new SELinux file context for each brick path and runs a restorecon to label the brick. The volume delete hook removes the per-brick SELinux file context. Change-Id: I5f102db5382d813c4d822ff74e873a7a669b41db BUG: 1047975 Signed-off-by: Brian Foster <bfoster@redhat.com> Signed-off-by: Niels de Vos <ndevos@redhat.com> Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: https://review.gluster.org/6630 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>