support updatenode ospkgs for SLES SDK

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12222 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
ligc 2012-04-12 09:29:17 +00:00
parent ac03612e39
commit fdc6485616
2 changed files with 32 additions and 0 deletions

View File

@ -574,6 +574,18 @@ sub makescript
}
}
# SLES sdk
if ($os =~ /sles.*/)
{
my $installdir = $::XCATSITEVALS{'installdir'} ? $::XCATSITEVALS{'installdir'} : "/install";
my $sdkdir = "$installdir/$os/$arch/sdk1";
if (-e "$sdkdir")
{
push @scriptd, "SDKDIR='" . $sdkdir . "'\n";
push @scriptd, "export SDKDIR\n";
}
}
# check if there are sync files to be handled
my $syncfile;
if ( ($provmethod)

View File

@ -85,6 +85,12 @@ if [ -z "$OSPKGDIR" ]; then
fi
fi
if [ "$SDKDIR" != "" ]; then
if [ $mounted -eq 0 ]; then
SDKDIR="$NFSSERVER/$SDKDIR"
fi
fi
if [ $mounted -eq 0 ]; then
OSPKGDIR_NO_PREFIX=${OSPKGDIR#$INSTALLDIR}
@ -277,6 +283,20 @@ elif ( pmatch "$OSVER" "sles11*" ); then
echo "ospkgs: zypper ar $path $OSVER"
echo " $result"
fi
if [ "$SDKDIR" != "" ]; then
if [ $mounted -eq 0 ]; then
SDKDIR="http://$SDKDIR"
else
SDKDIR="file://$SDKDIR"
fi
result=`zypper ar $SDKDIR $OSVER-sdk`
if [ $? -ne 0 ]; then
logger -t xcat "ospkgs: zypper ar $SDKDIR $OSVER-sdk\n $result"
echo "ospkgs: zypper ar $SDKDIR $OSVER-sdk"
echo " $result"
fi
fi
result=`zypper --non-interactive refresh 2>&1`
if [ $debug -ne 0 ]; then