PLEX86  x86- Virtual Machine (VM) Program
 Plex86  |  CVS  |  Mailing List  |  Download  |  Linux  |  Newsgroups

bash script to trick rpm


Your Ad Here

Your Ad Here

I need to install an app into CentOS that is checking to see if it is RedHat.

The way it does its checks is via rpm;

vendorstr=`rpm -q --queryformat '%{vendor}' rpm 2` vendorstr2=`echo $vendorstr cut -f2 -d ":" cut -f1 -d","` LINUXDIST2=`echo $vendorstr cut -f1 -d" "tr 'A-Z' 'a-z'`

this returns the following three variables on CentOS

CentOSpackage 2 is not installed CentOSpackage 2 is not installed centospackage

Getting started with old laptop
well as some "customized" distros (using KDE) that came with our equipment. To say I'm impressed is an...

and on RedHat RHEL 3

Red Hat, Inc.package 2 is not installed Red Hat red

The only variable I need to worry about is the first, the rest are derived from its result. So...

The above variables are set in a script which is called from an installer. It in turns expands packages on the fly. I cannot modify the original script, its embeded in the binary installer.

So, I need to trick rpm (or something else..). One way I was thinking was to write a small shell script that stated "if rpm is called with rpm -q --queryformat then return "Red Hat, Inc." I'm not sure how I would do this. I can rename the rpm binary to rpm.orig and call the script rpm, if the call doesn't fit the if then the original rpm is called.

Given the above scenario does anyone have any ideas on how I may do this?

Thanks for an and all help.

Getting started with old laptop 1715
On Sat, 24 Jun 2006 14:09:55 -0600, Bryan Heit staggered into the Black Sun and said: This is unlikely. It's more probable that the LiveCDs you tried didn't...

Cheers.

xscousr



Your Ad Here

List | Previous | Next

Getting started with old laptop

Linux groups from Newsgroups

The #1 Usenet Provider on the Internet

can access tty