diff --git a/xCAT-rmc/xCAT-rmc.spec b/xCAT-rmc/xCAT-rmc.spec index f37c2e805..722aeee4f 100644 --- a/xCAT-rmc/xCAT-rmc.spec +++ b/xCAT-rmc/xCAT-rmc.spec @@ -58,26 +58,14 @@ rm -rf $RPM_BUILD_ROOT %post %ifos linux if [ -f "/proc/cmdline" ]; then # prevent running it during install into chroot image - tmp=`rpm -q xCAT` - if [ $? -eq 0 ]; then + if [ -f $RPM_INSTALL_PREFIX0/sbin/xcatd ]; then /etc/init.d/xcatd restart - else - tmp=`rpm -q xCATsn` - if [ $? -eq 0 ]; then - /etc/init.d/xcatd restart - fi fi fi %else #restart the xcatd on if xCAT or xCATsn is installed already - tmp=`rpm -q xCAT` - if [ $? -eq 0 ]; then + if [ -f $RPM_INSTALL_PREFIX0/sbin/xcatd ]; then XCATROOT=$RPM_INSTALL_PREFIX0 $RPM_INSTALL_PREFIX0/sbin/xcatstart - else - tmp=`rpm -q xCATsn` - if [ $? -eq 0 ]; then - XCATROOT=$RPM_INSTALL_PREFIX0 $RPM_INSTALL_PREFIX0/sbin/xcatstart - fi fi %endif