fix defect #4145 [DEV] /etc/httpd/conf.d/xcat.conf is missing after xcat upgrade

This commit is contained in:
immarvin 2014-05-29 01:30:42 -07:00
parent 543b2d23af
commit b6658bd232

View File

@ -116,6 +116,7 @@ fi
%install
mkdir -p $RPM_BUILD_ROOT/etc/xcat/conf.orig
mkdir -p $RPM_BUILD_ROOT/etc/apache2/conf.d
mkdir -p $RPM_BUILD_ROOT/etc/httpd/conf.d
mkdir -p $RPM_BUILD_ROOT/install/postscripts
@ -152,10 +153,9 @@ chmod 755 $RPM_BUILD_ROOT/install/postscripts/*
rm LICENSE.html
mkdir -p postscripts/hostkeys
cd -
cp %{SOURCE1} $RPM_BUILD_ROOT/etc/apache2/conf.d/xcat.conf.apach22
cp %{SOURCE7} $RPM_BUILD_ROOT/etc/apache2/conf.d/xcat.conf.apach24
cp %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/conf.d/xcat.conf.apach22
cp %{SOURCE7} $RPM_BUILD_ROOT/etc/httpd/conf.d/xcat.conf.apach24
cp %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/conf.d/xcat.conf
cp %{SOURCE1} $RPM_BUILD_ROOT/etc/apache2/conf.d/xcat.conf
cp %{SOURCE7} $RPM_BUILD_ROOT/etc/xcat/conf.orig/xcat.conf.apach24
cp %{SOURCE5} $RPM_BUILD_ROOT/etc/xCATMN
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/xCAT
@ -168,23 +168,15 @@ cp LICENSE.html $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/xCAT
if [ -n "$(httpd -v 2>&1 |grep -e '^Server version\s*:.*\/2.4')" ]
then
rm -rf /etc/httpd/conf.d/xcat.conf
cp /etc/httpd/conf.d/xcat.conf.apach24 /etc/httpd/conf.d/xcat.conf
elif [ -n "$(apachectl -v 2>&1 |grep -e '^Server version\s*:.*\/2.4')" ]
then
rm -rf /etc/apache2/conf.d/xcat.conf
cp /etc/apache2/conf.d/xcat.conf.apach24 /etc/apache2/conf.d/xcat.conf
else
rm -rf /etc/httpd/conf.d/xcat.conf
cp /etc/httpd/conf.d/xcat.conf.apach22 /etc/httpd/conf.d/xcat.conf
rm -rf /etc/apache2/conf.d/xcat.conf
cp /etc/apache2/conf.d/xcat.conf.apach22 /etc/apache2/conf.d/xcat.conf
cp /etc/xcat/conf.orig/xcat.conf.apach24 /etc/httpd/conf.d/xcat.conf
fi
if [ -n "$(apachectl -v 2>&1 |grep -e '^Server version\s*:.*\/2.4')" ]
then
rm -rf /etc/apache2/conf.d/xcat.conf
cp /etc/xcat/conf.orig/xcat.conf.apach24 /etc/apache2/conf.d/xcat.conf
fi
rm -rf /etc/apache2/conf.d/xcat.conf.apach22
rm -rf /etc/apache2/conf.d/xcat.conf.apach24
rm -rf /etc/httpd/conf.d/xcat.conf.apach22
rm -rf /etc/httpd/conf.d/xcat.conf.apach24
%endif
@ -220,11 +212,9 @@ exit 0
%files
%{prefix}
# one for sles, one for rhel. yes, it's ugly...
/etc/apache2/conf.d/xcat.conf.apach22
/etc/apache2/conf.d/xcat.conf.apach24
/etc/httpd/conf.d/xcat.conf.apach22
/etc/httpd/conf.d/xcat.conf.apach24
/etc/xcat/conf.orig/xcat.conf.apach24
/etc/httpd/conf.d/xcat.conf
/etc/apache2/conf.d/xcat.conf
/etc/xCATMN
/install/postscripts
/install/prescripts