Defect 3514607 - RPM checks for ifix

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@12527 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jwsimpson 2012-05-04 14:29:20 +00:00
parent 236888437d
commit 86d96195bf
7 changed files with 83 additions and 1 deletions

View File

@ -105,6 +105,18 @@ rm -rf $RPM_BUILD_ROOT
# Just package everything that has been copied into RPM_BUILD_ROOT
%{prefix}
%pre
# only need to check on AIX
%ifnos linux
if [ -x /usr/sbin/emgr ]; then # Check for emgr cmd
/usr/sbin/emgr -l 2>&1 | grep -i xCAT # Test for any xcat ifixes - msg and exit if found
if [ $? = 0 ]; then
echo "Error: One or more xCAT emgr ifixes are installed. You must use the /usr/sbin/emgr command to uninstall each xCAT emgr ifix prior to RPM installation."
exit 2
fi
fi
%endif
%post
%ifos linux
if [ "$1" -gt 1 ]; then #Ugrade only, restart daemon and migrate settings

View File

@ -66,6 +66,18 @@ rm -rf $RPM_BUILD_ROOT
%changelog
%pre
# only need to check on AIX
%ifnos linux
if [ -x /usr/sbin/emgr ]; then # Check for emgr cmd
/usr/sbin/emgr -l 2>&1 | grep -i xCAT # Test for any xcat ifixes - msg and exit if found
if [ $? = 0 ]; then
echo "Error: One or more xCAT emgr ifixes are installed. You must use the /usr/sbin/emgr command to uninstall each xCAT emgr ifix prior to RPM installation."
exit 2
fi
fi
%endif
%post
%preun

View File

@ -218,6 +218,18 @@ rm -rf $RPM_BUILD_ROOT
* Tue Feb 20 2007 Jarrod Johnson <jbjohnso@us.ibm.com>
- Start core rpm for 1.3 work
%pre
# only need to check on AIX
%ifnos linux
if [ -x /usr/sbin/emgr ]; then # Check for emgr cmd
/usr/sbin/emgr -l 2>&1 | grep -i xCAT # Test for any xcat ifixes - msg and exit if found
if [ $? = 0 ]; then
echo "Error: One or more xCAT emgr ifixes are installed. You must use the /usr/sbin/emgr command to uninstall each xCAT emgr ifix prior to RPM installation."
exit 2
fi
fi
%endif
%post
%ifos linux
cat << EOF > /etc/profile.d/xcat.sh

View File

@ -54,6 +54,18 @@ rm -rf $RPM_BUILD_ROOT
%changelog
%pre
# only need to check on AIX
%ifnos linux
if [ -x /usr/sbin/emgr ]; then # Check for emgr cmd
/usr/sbin/emgr -l 2>&1 | grep -i xCAT # Test for any xcat ifixes - msg and exit if found
if [ $? = 0 ]; then
echo "Error: One or more xCAT emgr ifixes are installed. You must use the /usr/sbin/emgr command to uninstall each xCAT emgr ifix prior to RPM installation."
exit 2
fi
fi
%endif
%post
needCopyFiles=0
if [ -f /etc/xCATMN ]; then

View File

@ -250,6 +250,18 @@ rm -rf $RPM_BUILD_ROOT
* Tue Feb 20 2007 Jarrod Johnson <jbjohnso@us.ibm.com>
- Start core rpm for 1.3 work
%pre
# only need to check on AIX
%ifnos linux
if [ -x /usr/sbin/emgr ]; then # Check for emgr cmd
/usr/sbin/emgr -l 2>&1 | grep -i xCAT # Test for any xcat ifixes - msg and exit if found
if [ $? = 0 ]; then
echo "Error: One or more xCAT emgr ifixes are installed. You must use the /usr/sbin/emgr command to uninstall each xCAT emgr ifix prior to RPM installation."
exit 2
fi
fi
%endif
%post
%ifos linux
ln -sf $RPM_INSTALL_PREFIX0/sbin/xcatd /usr/sbin/xcatd

View File

@ -78,6 +78,17 @@ if [ -e "/etc/SuSE-release" ]; then
exit -1;
fi
fi
# only need to check on AIX
%ifnos linux
if [ -x /usr/sbin/emgr ]; then # Check for emgr cmd
/usr/sbin/emgr -l 2>&1 | grep -i xCAT # Test for any xcat ifixes - msg and exit if found
if [ $? = 0 ]; then
echo "Error: One or more xCAT emgr ifixes are installed. You must use the /usr/sbin/emgr command to uninstall each xCAT emgr ifix prior to RPM installation."
exit 2
fi
fi
%endif
%install

View File

@ -80,8 +80,19 @@ mkdir -p $RPM_BUILD_ROOT/opt/xcat/
cp %{SOURCE3} $RPM_BUILD_ROOT/etc/xCATSN
%endif
%post
%pre
# only need to check on AIX
%ifnos linux
if [ -x /usr/sbin/emgr ]; then # Check for emgr cmd
/usr/sbin/emgr -l 2>&1 | grep -i xCAT # Test for any xcat ifixes - msg and exit if found
if [ $? = 0 ]; then
echo "Error: One or more xCAT emgr ifixes are installed. You must use the /usr/sbin/emgr command to uninstall each xCAT emgr ifix prior to RPM installation."
exit 2
fi
fi
%endif
%post
if [ "$1" = "1" ]; then #Only if installing for the first time..