fixed rmc configuration problem on AIX

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4297 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
linggao 2009-10-05 20:12:42 +00:00
parent 8c310f0272
commit 725e9a266a
2 changed files with 24 additions and 12 deletions

View File

@ -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

View File

@ -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