Differentiating between Similar Machines for Imaging
Novell Cool Solutions: Trench
By Luc Van de Velde
Digg This -
Posted: 7 Aug 2003
The company I'm working for has two different environments. The production division is DOS-based and the others are Windows 2000 Pro-based. We buy our PCs from Compaq in bulk so most of them are the same.
We started using ZENworks for Desktops 4 and wanted to use the Imaging features to deploy new machines and in addition update and maintain the already installed ones.
As I said before, most machines are the same so the standard imaging rules of ZENworks are not sufficient. This left us with the problem of differentiating between a DOS and Windows machine when distributing images. Since Compaq has had the "asset" and "ownership tag" integrated in its bios we thought of using these to make a difference between the machines.
Unfortunately the standard ZfD4 tools do not allow us to read these tags. So I searched the Internet, asked around on the support forums and Cool Solutions site but came up empty handed.
SOLUTION: Then I found DMI Decode. This Linux utility, originally written by Alan Cox and currently maintained by Jean Delvare and available under the GNU GENERAL PUBLIC LICENSE, is able to display the information from DMIBIOS. Although this did not display or extract the mentioned ownership tag, it did give me hope again to get it working.
I contacted Jean Delvare and he immediately took an interest in this. After some research, Jean came up with the necessary code to extract the ownership tag. I compiled this on an RHL 8.0 machine and copied it to the Linux.2 file and added it to the bootable CD of ZENworks. Now I'm able to detect what kind of image should be placed on the machines. Although the use of the tag was my idea, I take no credit for the actual coding; all credits for this go to Jean Delvare who was really a great help.
I know that some other manufacturers also use the ownership tag in their bios but this was never tested.
It might be possible to accomplish this with some modifications to the code.
You can download DMI Decode and the other utilities from http://savannah.nongnu.org/cvs/?group=dmidecode. You can contact Jean at email@example.com. If you are living in France please visit Jean"s website at http://rpmfind.net/linux/RPM/Jean_Delvare__delvare_ensicaen.ismra.fr_.html.
#Read the ownership tag WSTYPE=$(ownership) #See if there is a ZENworks partition on the machine /bin/zdisk -detect > /tmp/zpart.s . /tmp/zpart.s if [ "$DISABLEZEN" = "0" ] && [ "$ENABLEZEN" = "0" ] then ZENPART="0" else ZENPART="1" fi #Install the correct image if [ "$WSTYPE" = "DOS622" ] then if [ "$ZENPART" = "0" ] then img rp $PROXYADDR //$PROXYADDR/vol1/dos622-no-zen-part.zmg img rp $PROXYADDR //$PROXYADDR/vol1/dos622-network-drivers.zmg else img rp $PROXYADDR //$PROXYADDR/vol1/dos622-with-zen-part.zmg img rp $PROXYADDR //$PROXYADDR/vol1/dos622-network-drivers.zmg fi fi if [ "$WSTYPE" = "WIN2000" ] ; then if [ "$ZENPART" = "0" ] ; then img rp $PROXYADDR //$PROXYADDR/vol1/w2ksp3-no-zen-part.zmg else img rp $PROXYADDR //$PROXYADDR/vol1/w2ksp3-with-zen-part.zmg fi fi
If you have any questions you may contact Luc at firstname.lastname@example.org
Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com