[openstack-tripleo-image-elements] Update %post script
slagle
slagle at fedoraproject.org
Thu Oct 23 18:04:17 UTC 2014
commit f855324643fe54842775f14f76a8b0b5dcf2fe60
Author: James Slagle <jslagle at redhat.com>
Date: Thu Oct 23 13:45:53 2014 -0400
Update %post script
openstack-tripleo-image-elements.spec | 38 ++++++++++++++++++++-------------
1 files changed, 23 insertions(+), 15 deletions(-)
---
diff --git a/openstack-tripleo-image-elements.spec b/openstack-tripleo-image-elements.spec
index 7fe7bcd..f84461b 100644
--- a/openstack-tripleo-image-elements.spec
+++ b/openstack-tripleo-image-elements.spec
@@ -63,27 +63,35 @@ manifest_file=/etc/dib-manifests/dib-element-manifest
if [ -f $manifest_file ]; then
# Update os-refresh-config scripts
rm -rf /opt/stack/os-config-refresh/*
- while read element; do
- rsync -avz \
- %{_datadir}/tripleo-image-elements/$element/os-refresh-config/* \
- /opt/stack/os-config-refresh/
- done < $manifest_file
+ if [ -d /usr/libexec/os-refresh-config ]; then
+ while read element; do
+ rsync -av \
+ %{_datadir}/tripleo-image-elements/$element/os-refresh-config/* \
+ /usr/libexec/os-refresh-config
+ done < $manifest_file
+ fi
# Update os-apply-config templates
rm -rf /usr/libexec/os-apply-config/templates/*
- while read element; do
- rsync -avz \
- %{_datadir}/tripleo-image-elements/$element/os-apply-config/* \
- /usr/libexec/os-apply-config/templates/
- done < $manifest_file
+ if [ -d /usr/libexec/os-apply-config ]; then
+ while read element; do
+ rsync -av \
+ %{_datadir}/tripleo-image-elements/$element/os-apply-config/* \
+ /usr/libexec/os-apply-config/templates/
+ done < $manifest_file
+ fi
# Update binaries in /usr/local/bin
- while read element; do
- rsync -avz \
- %{_datadir}/tripleo-image-elements/$element/bin/* \
- /usr/local/bin/
- done < $manifest_file
+ if [ -d /usr/local/bin ]; then
+ while read element; do
+ rsync -av \
+ %{_datadir}/tripleo-image-elements/$element/bin/* \
+ /usr/local/bin/
+ done < $manifest_file
+ fi
fi
+# be sure to always exit true
+true
%files
%doc LICENSE
More information about the scm-commits
mailing list