Updating SLE10 product info via ZLM 7.2 SLE10-SP1-Online-Bundle after upgrading to SLE10 SP1

  • 3167433
  • 19-Jul-2007
  • 30-Apr-2012

Environment

Novell ZENworks 7.2 Linux Management - ZLM7.2
Novell SUSE Linux Enterprise Server 10

Situation

SLE10 does not appear to be upgraded to SLE10 SP1 when using ZLM 7.2 SLE10-SP1-Online-Bundle
"rug pd" command indicates that SLE10 has not been upgraded to SLE10 SP1

Resolution

In ZCC edit the SLE10-SP1-Online-Bundle to add the following script as a post-installation script:

---------------------------------------------------------------------------------
#!/bin/sh
for file in `ls -1 /var/lib/zypp/db/products/` ; do
if [ `grep "SUSE_SLED" /var/lib/zypp/db/products/$file | wc -l` -eq 1 ]; then
rm /var/lib/zypp/db/products/$file
elif [ `grep "SUSE_SLES" /var/lib/zypp/db/products/$file | wc -l` -eq 1 ]; then
rm /var/lib/zypp/db/products/$file
fi
done

sarch=`arch`
datesec=`date +%s`

filename="/var/lib/zypp/db/products/"`uuidgen | awk '{gsub(/-/,"",$1); print $1}'`
if [ `cat /etc/SuSE-release |grep "SUSE Linux Enterprise Desktop 10"|wc -l` -eq 1 ]; then
issled=1
else
issled=0
fi

echo'
https://www.novell.com/metadata/zypp/xml-store" type="base">'>$filename

if [ $issled -eq 1 ]; then
echo 'SUSE_SLED_SP1
'>>$filename
echo "$sarch">> $filename
echo 'SUSE_SLE == 10.1
SUSE_SLED == 10.1
SUSE-Linux-Enterprise-Desktop-SP1 == 10-SP1
SUSE_SLED_SP1 == 10.1-0

SUSE_SLED < 10.1

basesystem
sled-release-10-sp1


SUSE Linux Enterprise Desktop 10 SP1
SUSE Linux Enterprise Desktop 10 SP1
SUSE Linux Enterprise Desktop 10 SP1
SUSE Linux Enterprise Desktop 10 SP1'>> $filename
else
echo 'SUSE_SLES_SP1
'>>$filename
echo "$sarch">> $filename
echo 'SUSE_SLE == 10.1
SUSE_SLES == 10.1
SUSE-Linux-Enterprise-Server-SP1 == 10-SP1
SUSE_SLES_SP1 == 10.1-0

SUSE_SLES < 10.1

sles-release-10-sp1
basesystem


SUSE Linux Enterprise Server 10 SP1
SUSE Linux Enterprise Server 10 SP1
SUSE Linux Enterprise Server 10 SP1
SUSE Linux Enterprise Server 10 SP1'>> $filename
fi

echo'











SUSE LINUX Products GmbH, Nuernberg, Germany
0
0
false
0'>> $filename
echo "$datesec">> $filename

if [ $issled -eq 1 ]; then
echo 'SLED 10 SP1
SUSE-Linux-Enterprise-Desktop-SP1
10-SP1
SUSE Linux Enterprise Desktop 10 SP1 10.1-0
https://www.novell.com/linux/releasenotes/i386/SUSE-SLED/10-SP1/release-notes-sled.rpm'>>$filename
else
echo 'SLES 10 SP1
SUSE-Linux-Enterprise-Server-SP1
10-SP1
SUSE Linux Enterprise Server 10 SP1
https://www.novell.com/linux/releasenotes/i386/SUSE-SLES/10-SP1/release-notes-sles.rpm'>> $filename
fi
echo '






update


'>> $filename
-------------------------------------------------------------------------------------

Save and deploy the bundle. When this bundle is installed on a SLE10 GA device, the product info will get updated.

Additional Information

The steps to replicate this problem involve creating a bundle in ZLM 7.2 server by mirroring SLE10-SP1-Online catalog from nu.novell.com and assign the bundle to a SLE10 managed device, so that the bundle gets installed on the device and the device becomes SLE10 SP1 device.
When a SLE10 GA device is upgraded online from nu.novell.com, a special patch called product-sled10-sp1 is installed which updates the product information. This patch does not have a corresponding rpm file. zlmmirror mirrors down SLE10-SP1-Online, but it only creates a bundle of rpms. When this bundle is installed on a SLE10 GA device, this patch does not get installed and product information does not get updated to reflect that the device is SLE10 SP1.