> 
> 
> 
> I have a quick question for everyone, I have to write an installation script
> for a piece of software on linux, however, this product is supported on
> multiple distribution types. I need some definitive way of determining a
> SYSTYPE variable to the tune of
> 
>       cat /path/to/item | grep Redhat
> 
> 
>       Etc...
> 
> The distributions do handle things differently, but some common piece must
> be shared. I was originally figuring on doing a cat on /proc/version,
> however, this only greps out the current kernel version, and on machines
> with custom kernels, is basically useless.

If rpm is present, it's probably an rpm-based distribution (that is, it's 
neither Debian not Corel; I don't know about Slackware).
Use
 rpm -q redhat-release
 rpm -q mandrake-release
to test for redhat and mandrake respectively.

I don't know how to test for SuSe, Yellowdog etc, but if you check their ftp 
sites you will find whether the above test translates.

Presumably if you want to test it on each distro, you are going to discover 
whether that test works;-)
 
-- 
Cheers
John Summerfield
http://www2.ami.com.au/ for OS/2 & linux information.
Configuration, networking, combined IBM ftpsites index.

Microsoft's most solid OS: http://www.geocities.com/rcwoolley/

Note: mail delivered to me is deemed to be intended for me, for my disposition.





_______________________________________________
Redhat-devel-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-devel-list

Reply via email to