diff --git a/xCAT-client-2.0/xCAT-client.spec b/xCAT-client-2.0/xCAT-client.spec index bd819e0b8..6699be5a9 100644 --- a/xCAT-client-2.0/xCAT-client.spec +++ b/xCAT-client-2.0/xCAT-client.spec @@ -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 diff --git a/xCAT-server-2.0/xCAT-server.spec b/xCAT-server-2.0/xCAT-server.spec index e78cebc8a..d292d4a75 100644 --- a/xCAT-server-2.0/xCAT-server.spec +++ b/xCAT-server-2.0/xCAT-server.spec @@ -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 diff --git a/xCATsn/xCATsn.spec b/xCATsn/xCATsn.spec index 7e453ec80..309eb188f 100644 --- a/xCATsn/xCATsn.spec +++ b/xCATsn/xCATsn.spec @@ -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