From b12ca5863a53c64cf6cffcfe27f0c61f24d3bc92 Mon Sep 17 00:00:00 2001 From: lissav Date: Tue, 26 May 2009 17:19:47 +0000 Subject: [PATCH] fix creation of xcat.sh and xcat.csh such that it contains a trailing : on manpath to allow searching of system manpaths git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3448 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-client/xCAT-client.spec | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/xCAT-client/xCAT-client.spec b/xCAT-client/xCAT-client.spec index 460a707a2..9efacda09 100644 --- a/xCAT-client/xCAT-client.spec +++ b/xCAT-client/xCAT-client.spec @@ -174,6 +174,8 @@ ln -sf ../bin/xcatclient $RPM_BUILD_ROOT/%{prefix}/bin/mkconn ln -sf ../bin/xcatclient $RPM_BUILD_ROOT/%{prefix}/bin/rmconn ln -sf ../bin/xcatclient $RPM_BUILD_ROOT/%{prefix}/bin/lsconn + + %clean # This step does not happen until *after* the %files packaging below rm -rf $RPM_BUILD_ROOT @@ -193,16 +195,24 @@ rm -rf $RPM_BUILD_ROOT %post %ifos linux -echo "XCATROOT=$RPM_INSTALL_PREFIX0 +cat << EOF > /etc/profile.d/xcat.sh +XCATROOT=$RPM_INSTALL_PREFIX0 PATH=\$PATH:\$XCATROOT/bin:\$XCATROOT/sbin -MANPATH=\$MANPATH:\$XCATROOT/share/man +MANPATH=\$MANPATH:\$XCATROOT/share/man: export XCATROOT PATH MANPATH -export PERL_BADLANG=0" >/etc/profile.d/xcat.sh +export PERL_BADLANG=0 +EOF -echo "setenv XCATROOT \"$RPM_INSTALL_PREFIX0\" +cat << EOF > /etc/profile.d/xcat.csh +setenv XCATROOT "$RPM_INSTALL_PREFIX0" setenv PATH \${PATH}:\${XCATROOT}/bin:\${XCATROOT}/sbin -setenv MANPATH \${MANPATH}:\${XCATROOT}/share/man -setenv PERL_BADLANG 0" >/etc/profile.d/xcat.csh +if !(\$?MANPATH) then + setenv MANPATH \${XCATROOT}/share/man: +else + setenv MANPATH \${MANPATH}:\${XCATROOT}/share/man: +endif +setenv PERL_BADLANG 0 +EOF chmod 755 /etc/profile.d/xcat.* %else