Changeset 2865
- Timestamp:
- 10/29/06 15:19:44 (7 years ago)
- Files:
-
- modules/branches/2.2/irc/functions.inc.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.2/irc/functions.inc.php
r2292 r2865 4 4 // Various places that may have the Distro Name.. 5 5 $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) { 9 14 if (is_readable($loc)) { 10 15 $fh = fopen($loc, "r"); 11 16 if ($version != "") { 12 $version .= " OR ". fgets($fh, 80);17 $version .= " OR ".$distro.' '.fgets($fh, 80); 13 18 } else { 14 $version = fgets($fh, 80);19 $version = $distro.' '.fgets($fh, 80); 15 20 } 16 21 }
