summaryrefslogtreecommitdiffstats
path: root/extras/hook-scripts/start/post/S30samba-start.sh
Commit message (Collapse)AuthorAgeFilesLines
* extras/hooks: Remove smb.conf parameter allowing guest accessAnoop C S2019-12-101-1/+0
| | | | | | Change-Id: I88f494f16153d27ab6e2f2faf4d557e075671b10 Fixes: bz#1775612 Signed-off-by: Anoop C S <anoopcs@redhat.com>
* gluster-smb:add smb parameter when access gluster by cifsyinkui2019-08-211-0/+1
| | | | | | Change-Id: I9ff54f2ca6f86bb5b2f4740485a0159e1fd7785f Fixes: bz#1741734 Signed-off-by: yinkui <13965432176@163.com>
* Do not blindly add volume share section to smb.confMilan Zink2018-12-041-3/+15
| | | | | | | | | | | | | With this change, by default GlusterFS volume share section will no longer be added to smb.conf for client access unless user.cifs or user.smb volume set options are enabled. This also fixes the hook script to check for presence of all configuration possibilities for those volume set options like 'enable' or 'on'. Change-Id: Ibecf7fffb4507d7255d963c3b1482afb0d0db984 Signed-off-by: Milan Zink <mzink@redhat.com> Signed-off-by: Anoop C S <anoopcs@redhat.com> Fixes: bz#1575836
* extras/hooks: General improvements to S30samba-start.shAnoop C S2018-09-141-13/+13
| | | | | | | | | Based on https://review.gluster.org/c/glusterfs/+/19204 from Milan Zink <mzink@redhat.com> Change-Id: I61f62407a62475a74a6cc046c24748a31c66e6cd Updates: bz#1193929 Signed-off-by: Anoop C S <anoopcs@redhat.com>
* extras/hooks: Do not blindly remove volume share from smb.confAnoop C S2018-05-071-1/+3
| | | | | | | | | | | | | | | | | When Gluster volumes are shared via Samba, any extra smb.conf parameter setting done by administrator to those shares are lost during restart of the volume. Instead of removing the whole share completely from smb.conf(via hook scripts during volume stop) it is better to make it temporarily unavailable to end-users till the volume is started again. Therefore we make use of a smb.conf parameter named 'available'[1] to achieve the above intend. [1] https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html Change-Id: I68a9055b50791f6ffd3b95a3c13d858a75fa6530 fixes: bz#1558921 BUG: 1558921 Signed-off-by: Anoop C S <anoopcs@redhat.com>
* extras/hooks: Honour all input arguments to scriptsAnoop C S2017-10-311-1/+17
| | | | | | | | | | | | | | | | | Some of the hook scripts were not honouring the arguments with which they are invoked during various volume operations. So make sure that we consider everything while parsing the command line arguments to avoid following warnings: . . . ame: unrecognized option '--first=no' ame: unrecognized option '--version=1' ame: unrecognized option '--volume-op=start' . . . Change-Id: I5b08e5e7f32908c8509e97098a042096b507783e BUG: 1503983 Signed-off-by: Anoop C S <anoopcs@redhat.com>
* 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-5/+5
| | | | | | Change-Id: I217c6b2a39955f1709bb3452b00d33c2dcb60faa BUG: 1500649 Signed-off-by: Anoop C S <anoopcs@redhat.com>
* extras/hooks: Use double quotes while using [..]Anoop C S2017-04-271-1/+1
| | | | | | | | | | | | | | | This avoids the following warning when first operand is null [: =: unary operator expected Change-Id: I5439d8f60a6d9e30e6ba04c16c3de2096a87c38f BUG: 1446126 Signed-off-by: Anoop C S <anoopcs@redhat.com> Reviewed-on: https://review.gluster.org/17127 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: Jeff Darcy <jeff@pl.atyp.us>
* hook-scripts: fix S30Samba scripts on systemd systemsMichael Adam2015-12-171-1/+1
| | | | | | | | | | | | | | | | /etc/init.d/smb does not exist on systemd systems. Using "service smb <COMMAND>" is the portable way. It calls init scripts on sysv systems, and redirects to systemctl on systemd systems. Change-Id: I7146c9998a51d8b170d3321f3477e92704ae7615 BUG: 1290604 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-on: http://review.gluster.org/12945 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anoop C S <anoopcs@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* build: make GLUSTERD_WORKDIR rely on localstatedirHarshavardhana2014-08-071-14/+19
| | | | | | | | | | | | | | | | | | | | | | - Break-way from '/var/lib/glusterd' hard-coded previously, instead rely on 'configure' value from 'localstatedir' - Provide 's/lib/db' as default working directory for gluster management daemon for BSD and Darwin based installations - loff_t is really off_t on Darwin - fix-off the warnings generated by clang on FreeBSD/Darwin - Now 'tests/*' use GLUSTERD_WORKDIR a common variable for all platforms. - Define proper environment for running tests, define correct PATH and LD_LIBRARY_PATH when running tests, so that the desired version of glusterfs is used, regardless where it is installed. (Thanks to manu@netbsd.org for this additional work) Change-Id: I2339a0d9275de5939ccad3e52b535598064a35e7 BUG: 1111774 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/8246 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* extras/hookscripts: Remove %P from smb share path value.Raghavendra Talur2014-05-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | We had added %P in the value for path in smb share definitions to avoid ctdb errors. However, %P does not work well for windows clients and they fail to access the share. Solution for the original problem: The error messages were being generated by a monitoring script that ctdb runs. The script reads the path value from testparm and tests if it exists in the local machine. This particular check does not hold valid for virtual file system backends like gluster. There is no harm in asking ctdb to not to check the existence of such backend and can be done by setting the following config in ctdb.conf: CTDB_SAMBA_SKIP_SHARE_CHECK=YES. Change-Id: I91627c8a279126a5cc24c6347847f9bfbad53dd5 BUG: 1068776 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/7598 Reviewed-by: Jose A. Rivera <jarrpa@redhat.com> Reviewed-by: Poornima G <pgurusid@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
* hook-scripts: Move smb hooks to right place.Raghavendra Talur2014-03-101-0/+110
Moved the hook-scripts to dirs corresponding to event. Also, edited S30samba-set.sh to with changes in other two hook scripts to bring uniformity. Change-Id: Ib98c0a18d4bb5d0ba4b881b2e19b40d72580b1c2 BUG: 1073468 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/7201 Reviewed-by: Poornima G <pgurusid@redhat.com> Reviewed-by: Bala FA <barumuga@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>