Changeset 2865

Show
Ignore:
Timestamp:
10/29/06 15:19:44 (7 years ago)
Author:
gregmac
Message:

Added distro name to version information

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.2/irc/functions.inc.php

    r2292 r2865  
    44  // Various places that may have the Distro Name.. 
    55  $version = ""; 
    6   $locations = array('/etc/redhat-release', '/etc/fedora-release',  
    7   '/etc/debian_version', '/etc/SuSE-release', '/etc/gentoo-release'); 
    8   foreach ($locations as $loc) { 
     6  $locations = array( 
     7    'Redhat' => '/etc/redhat-release',  
     8  'Fedora' => '/etc/fedora-release',  
     9  'Debian' => '/etc/debian_version',  
     10  'SuSE' => '/etc/SuSE-release',  
     11  'Gentoo' => '/etc/gentoo-release' 
     12  ); 
     13  foreach ($locations as $distro => $loc) { 
    914  if (is_readable($loc)) { 
    1015    $fh = fopen($loc, "r"); 
    1116    if ($version != "") { 
    12       $version .= " OR ".fgets($fh, 80); 
     17      $version .= " OR ".$distro.' '.fgets($fh, 80); 
    1318    } else { 
    14       $version = fgets($fh, 80); 
     19      $version = $distro.' '.fgets($fh, 80); 
    1520    } 
    1621  }