From 9ef0c896876ca7aacb5d5841c41cf1ca89d0c5cc Mon Sep 17 00:00:00 2001 From: mxi1 Date: Tue, 22 Dec 2009 03:14:23 +0000 Subject: [PATCH] the check point is moved to pre git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4836 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-UI/xCAT-UI.spec | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/xCAT-UI/xCAT-UI.spec b/xCAT-UI/xCAT-UI.spec index 3902c594d..95d280b75 100644 --- a/xCAT-UI/xCAT-UI.spec +++ b/xCAT-UI/xCAT-UI.spec @@ -64,6 +64,17 @@ else #SUSE exit -1; fi fi + +%else #on AIX + if [ -e "/usr/IBM/HTTPServer/conf/httpd.conf" ]; then + echo "Installing xCAT-UI on AIX..." + else + echo "" + echo "Error!" + echo "The IBM HTTP Server is not installed or not installed into the default directory(/usr/IBM/HTTPServer/)" + exit -1; + fi + %endif %post @@ -124,22 +135,12 @@ ihs_config_dir='/usr/IBM/HTTPServer/conf' if [ "$1" = 1 ] #initial install then # check if IBM HTTP Server is installed into the default directory or not - if [ -f "/usr/IBM/HTTPServer/conf/httpd.conf" ]; then - # Update the apache config - echo "Updating ibm http server configuration for xCAT..." - /bin/rm -f /usr/IBM/HTTPServer/conf/xcat-ui.conf - cp /usr/IBM/HTTPServer/conf/httpd.conf /usr/IBM/HTTPServer/conf/httpd.conf.xcat.ui.bak - cat /opt/xcat/ui/etc/apache2/conf.d/xcat-ui.conf >> /usr/IBM/HTTPServer/conf/httpd.conf - /usr/IBM/HTTPServer/bin/apachectl restart - - # put the encrypted password in /etc/security/passwd to the xcat passwd db - CONT=`cat /etc/security/passwd` - %{prefix}/sbin/chtab key=xcat,username=root passwd.password=`echo $CONT |cut -d ' ' -f 4` - else - echo "" - echo "Error!" - echo "The IBM HTTP Server is not installed or not installed into the default directory(/usr/IBM/HTTPServer/)" - fi + # Update the apache config + echo "Updating ibm http server configuration for xCAT..." + bin/rm -f /usr/IBM/HTTPServer/conf/xcat-ui.conf + cp /usr/IBM/HTTPServer/conf/httpd.conf /usr/IBM/HTTPServer/conf/httpd.conf.xcat.ui.bak + cat /opt/xcat/ui/etc/apache2/conf.d/xcat-ui.conf >> /usr/IBM/HTTPServer/conf/httpd.conf + /usr/IBM/HTTPServer/bin/apachectl restart # put the encrypted password in /etc/security/passwd to the xcat passwd db CONT=`cat /etc/security/passwd` @@ -192,7 +193,7 @@ fi %else #for AIX # Remove links made during the post install script echo "Undoing IBM HTTP Server configuration for xCAT..." -if [ -f "/usr/IBM/HTTPServer/conf/httpd.conf.xcat.ui.bak" ];then +if [ -e "/usr/IBM/HTTPServer/conf/httpd.conf.xcat.ui.bak" ];then cp /usr/IBM/HTTPServer/conf/httpd.conf.xcat.ui.bak /usr/IBM/HTTPServer/conf/httpd.conf rm -rf /usr/IBM/HTTPServer/conf/httpd.conf.xcat.ui.bak fi