> From: David Douthitt
 > [...]
 > The evidence of such trouble is evident already in a much simpler area: 
 > recognizing operating system versions and releases.  HP-UX 11 had this 
 > problem, and the numerous various Linux distributions render this almost 
 > impossible to keep up with.  Does cfengine recognize White Box Linux? 
 > TinySofa? Enguarde? Vine? Miracle? Red Flag?  And most importantly, can 
 > it be made to recognize these variants without recompiling?

The answer is most certainly yes.  The high energy physics world is
converging on a recompiled version of RHEL called Scientific Linux
(aka SL.)  I glanced at the hard os/distro class code for a few
minutes and decided not to patch the Source.  Instead I just wrote
the little module that follows my sig. 

steve 
- - - 
systems & network manager
high energy physics
university of wisconsin

#!/usr/bin/perl
if ( ! -f "/etc/redhat-release" ) { exit; }
$id = `cat /etc/redhat-release`;
if ( $id =~ /Scientific Linux/ )              { print "+sl\n";  }
if ( $id =~ /Scientific Linux 3/ )            { print "+sl3\n"; }
if ( $id =~ /Scientific Linux SL Release 3/ ) { print "+sl3\n"; }
if ( $id =~ /Scientific Linux SL Release 4/ ) { print "+sl4\n"; }



_______________________________________________
Help-cfengine mailing list
Help-cfengine@gnu.org
http://lists.gnu.org/mailman/listinfo/help-cfengine

Reply via email to