#!/bin/sh
#****************************************************************
# *	Copyright (C) 2003, Wistron Inc.  All Rights Reserved.
# *	File Name:		createrpminfo
# *	Author:			Jerry Zhou
# *	Create Time: 	2003-11-12 16:49:27
# *	Last Update: 	2003-11-12 16:49:27
#****************************************************************
sm_path=/usr/local/share/asmagent/wsma
tmpfile=$sm_path/pkginfotmp
pkgfile=$sm_path/pkginfo
rm -f $tmpfile
/bin/rpm --qf="beginbegin\nName==%{Name}-%{Version}-%{Release}\nProductName==%{Name}\nProductVendor==%{vendor}\nProductVersion==%{version}\nendend\n" -qa > $tmpfile

if cat $tmpfile | grep endend 1>/dev/null 2>/dev/null ; then
	rm -f $pkgfile
	mv -f $tmpfile $pkgfile
fi