summaryrefslogtreecommitdiffstats
path: root/glusterfs.spec.in
diff options
context:
space:
mode:
authorVijay Bellur <vijay@gluster.com>2012-06-12 14:55:14 +0530
committerVijay Bellur <vijay@gluster.com>2012-06-12 14:55:14 +0530
commit06436224b8e0509770c1ee39da43a5e9d516c337 (patch)
tree47206e7d405ee437a36bdd899a3049872f9a279b /glusterfs.spec.in
parentb28cab6483991e27078102075d29e2f15c967015 (diff)
build: Changes to pre-create directories and install hooks
Diffstat (limited to 'glusterfs.spec.in')
-rw-r--r--glusterfs.spec.in13
1 files changed, 10 insertions, 3 deletions
diff --git a/glusterfs.spec.in b/glusterfs.spec.in
index c425e06401d..5a265524627 100644
--- a/glusterfs.spec.in
+++ b/glusterfs.spec.in
@@ -228,9 +228,16 @@ sed -i 's|option working-directory /etc/glusterd|option working-directory %{_sha
%{buildroot}%{_sysconfdir}/glusterfs/glusterd.vol
# Following needed by the hooks interface
-%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hook-scripts
-%{__install} -p -m 0644 extras/hook-scripts/*.sh \
- %{buildroot}%{_sharedstatedir}/glusterd/hook-scripts/
+subdirs=("add-brick" "create" "delete" "remove-brick" "set" "start" "stop")
+for dir in ${subdirs[@]}
+do
+%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/"$dir"/pre
+%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/"$dir"/post
+done
+%{__install} -p -m 0744 extras/hook-scripts/start/post/*.sh \
+ %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/start/post
+%{__install} -p -m 0744 extras/hook-scripts/stop/pre/*.sh \
+ %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/stop/pre
# Clean up the examples we want to include as %%doc
#%{__cp} -a doc/examples examples