From cf66d77a50ccd312d725ed1762364ae8e8be4fe1 Mon Sep 17 00:00:00 2001 From: Scott Cantor Date: Wed, 24 Jun 2009 02:11:42 +0000 Subject: [PATCH] Posttrans hack needs to be conditional, and copy from installed locations, not build tree. --- shibboleth.spec.in | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/shibboleth.spec.in b/shibboleth.spec.in index 69a32df..dde375d 100644 --- a/shibboleth.spec.in +++ b/shibboleth.spec.in @@ -164,10 +164,12 @@ sh ./keygen.sh -b %posttrans # ugly hack if init script got removed during %postun by upgraded (buggy/2.1) package %if "%{_vendor}" == "redhat" - if [ ! -f %{_initrddir}/shibd ] ; then - %{__cp} -p $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/shibd-%{_vendor} $RPM_BUILD_ROOT%{_initrddir}/shibd - %{__chmod} 755 $RPM_BUILD_ROOT%{_initrddir}/shibd - fi + if [ ! -f %{_initrddir}/shibd ] ; then + if [ -f %{_sysconfdir}/%{name}/shibd-%{_vendor} ] ; then + %{__cp} -p %{_sysconfdir}/%{name}/shibd-%{_vendor} %{_initrddir}/shibd + %{__chmod} 755 %{_initrddir}/shibd + fi + fi %endif %files -f rpm.filelist -- 2.1.4