Prevent errors during installation of xCATsn into the service node image

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1463 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
bp-sawyers 2008-05-21 16:22:09 +00:00
parent 0ed6dfac60
commit cef96e7bb2
3 changed files with 18 additions and 10 deletions

View File

@ -170,11 +170,13 @@ rm -rf $RPM_BUILD_ROOT
echo "XCATROOT=$RPM_INSTALL_PREFIX0
PATH=\$PATH:\$XCATROOT/bin:\$XCATROOT/sbin
MANPATH=\$MANPATH:\$XCATROOT/share/man
export XCATROOT PATH MANPATH" >/etc/profile.d/xcat.sh
export XCATROOT PATH MANPATH
export PERL_BADLANG=0" >/etc/profile.d/xcat.sh
echo "setenv XCATROOT \"$RPM_INSTALL_PREFIX0\"
setenv PATH \${PATH}:\${XCATROOT}/bin:\${XCATROOT}/sbin
setenv MANPATH \${MANPATH}:\${XCATROOT}/share/man" >/etc/profile.d/xcat.csh
setenv MANPATH \${MANPATH}:\${XCATROOT}/share/man
setenv PERL_BADLANG 0" >/etc/profile.d/xcat.csh
chmod 755 /etc/profile.d/xcat.*
%else

View File

@ -144,14 +144,18 @@ else
echo "Unable to register init scripts on this system"
fi
if [ "$1" -gt "1" ]; then #only on upgrade...
/etc/init.d/xcatd restart
if [ -f "/proc/cmdline" ]; then # prevent running it during install into chroot image
/etc/init.d/xcatd restart
fi
fi
%endif
%preun
%ifos linux
if [ $1 == 0 ]; then #This means only on -e
/etc/init.d/xcatd stop
if [ -f "/proc/cmdline" ]; then # prevent running it during install into chroot image
/etc/init.d/xcatd stop
fi
if [ -x /usr/lib/lsb/remove_initd ]; then
/usr/lib/lsb/remove_initd /etc/init.d/xcatd
elif [ -x /sbin/chkconfig ]; then

View File

@ -12,14 +12,14 @@ BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root
#BuildArch: noarch
Source1: xcat.conf
Provides: xCATsn = %{version}
Requires: xCAT-server xCAT-client perl-xCAT perl-XML-Parser
Requires: xCAT-server xCAT-client perl-xCAT perl-XML-Parser
%ifos linux
Requires: atftp dhcp httpd nfs-utils expect conserver fping bind perl-DBD-Pg postgresql-server postgresql syslinux
%endif
%ifarch i386 i586 i686 x86 x86_64
Requires: xCAT-nbroot-oss-x86_64 xCAT-nbroot-core-x86_64 xCAT-nbkernel-x86_64
Requires: xCAT-nbroot-oss-x86_64 xCAT-nbroot-core-x86_64 xCAT-nbkernel-x86_64
Requires: ipmitool >= 1.8.9
%endif
@ -49,17 +49,19 @@ if [ "$1" = "1" ]; then #Only if installing for the first time..
mkdir -p /var/log/consoles
# makes it a service node
touch /etc/xCATSN
touch /etc/xCATSN
### Start the xcatd daemon
XCATROOT=$RPM_INSTALL_PREFIX0 /etc/init.d/xcatd start
chkconfig httpd on
/etc/rc.d/init.d/httpd stop
/etc/rc.d/init.d/httpd start
if (-f '/proc/cmdline') { # this check avoids running these when being installed into a chroot image
XCATROOT=$RPM_INSTALL_PREFIX0 /etc/init.d/xcatd start
/etc/rc.d/init.d/httpd stop
/etc/rc.d/init.d/httpd start
}
echo "xCATsn is now installed"
fi