diff --git a/xCAT-rmc/scripts/configrmcnode b/xCAT-rmc/scripts/configrmcnode index 27a23f656..86e823464 100755 --- a/xCAT-rmc/scripts/configrmcnode +++ b/xCAT-rmc/scripts/configrmcnode @@ -180,12 +180,25 @@ if [ $ADD -eq 1 ]; then fi mkdir -p /var/xcat/rmcmon rm -f -R /var/xcat/rmcmon - mkdir -p /tmp/postage/rmcmon - rm -f -R /tmp/postage/rmcmon/* - cd /tmp/postage/rmcmon - wget -l inf -N -r --waitretry=10 --random-wait --retry-connrefused -t 0 -T 60 ftp://$NFSSERVER/post/xcat/rmcmon 2> /tmp/wget.log - mv $NFSSERVER/post/xcat/rmcmon /var/xcat/rmcmon; - rm -rf $NFSSERVER + if [[ $OSTYPE = linux* ]]; then + mkdir -p /tmp/postage/rmcmon + rm -f -R /tmp/postage/rmcmon/* + cd /tmp/postage/rmcmon + wget -l inf -N -r --waitretry=10 --random-wait --retry-connrefused -t 0 -T 60 ftp://$NFSSERVER/postscripts/rmcmon 2> /tmp/wget.log + mv $NFSSERVER/postscripts/rmcmon /var/xcat/rmcmon; + rm -rf $NFSSERVER + else + mkdir -p /xcatmnt + result=`mount $NFSSERVER:/install/postscripts /xcatmnt` + if [ $? -gt 0 ]; then + echo "Failed to mount:$result" + logger xCAT "Failed to mount $result" + exit 1 + fi + cp -p -R /xcatmnt/rmcmon /var/xcat/rmcmon 2>/dev/null + umount /xcatmnt + rmdir /xcatmnt + fi chmod 755 /var/xcat/rmcmon/scripts/* /var/xcat/rmcmon/scripts/mkrmcresources /var/xcat/rmcmon/resources else diff --git a/xCAT-rmc/xCAT-rmc.spec b/xCAT-rmc/xCAT-rmc.spec index 437d32c27..a0f8eaf9e 100644 --- a/xCAT-rmc/xCAT-rmc.spec +++ b/xCAT-rmc/xCAT-rmc.spec @@ -33,8 +33,8 @@ rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_monitoring/rmc mkdir -p $RPM_BUILD_ROOT/%{prefix}/sbin/rmcmon mkdir -p $RPM_BUILD_ROOT/install/postscripts -mkdir -p $RPM_BUILD_ROOT/install/post/xcat/rmcmon/resources -mkdir -p $RPM_BUILD_ROOT/install/post/xcat/rmcmon/scripts +mkdir -p $RPM_BUILD_ROOT/install/postscripts/rmcmon/resources +mkdir -p $RPM_BUILD_ROOT/install/postscripts/rmcmon/scripts cp plugin/* $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_monitoring cp -r resources $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_monitoring/rmc @@ -50,11 +50,11 @@ echo "files=$FILES_TO_COPY" for file in $FILES_TO_COPY do echo "file=$file" - cp scripts/$file $RPM_BUILD_ROOT/install/post/xcat/rmcmon/scripts + cp scripts/$file $RPM_BUILD_ROOT/install/postscripts/rmcmon/scripts done -chmod 755 $RPM_BUILD_ROOT/install/post/xcat/rmcmon/scripts/* +chmod 755 $RPM_BUILD_ROOT/install/postscripts/rmcmon/scripts/* -cp -r resources/node/* $RPM_BUILD_ROOT/install/post/xcat/rmcmon/resources +cp -r resources/node/* $RPM_BUILD_ROOT/install/postscripts/rmcmon/resources %clean @@ -66,7 +66,6 @@ rm -rf $RPM_BUILD_ROOT %defattr(-, root, root) %{prefix} /install/postscripts -/install/post/xcat/rmcmon %changelog