From 663619e7d5290643e97da7ce9a4d1429714925d4 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Wed, 03 Sep 2008 17:44:57 -0400
Subject: [PATCH] - Added support for CentOS 5.2
---
install/lib/install.lib.php | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/install/lib/install.lib.php b/install/lib/install.lib.php
index ff47eee..c78c0f0 100644
--- a/install/lib/install.lib.php
+++ b/install/lib/install.lib.php
@@ -105,6 +105,14 @@
swriteln("Operating System: Fedora 9 or compatible\n");
}
+ if(stristr($content,'CentOS release 5.2 (Final)')) {
+ $distname = 'CentOS';
+ $distver = '5.2';
+ $distid = 'centos52';
+ $distbaseid = 'fedora';
+ swriteln("Operating System: CentOS 5.2 or compatible\n");
+ }
+
} else {
die('unrecognized linux distribution');
@@ -502,7 +510,7 @@
}
function replaceLine($filename,$search_pattern,$new_line,$strict = 0) {
- $lines = file($filename);
+ if($lines = @file($filename)) {
$out = '';
$found = 0;
foreach($lines as $line) {
@@ -526,10 +534,11 @@
$out .= $new_line."\n";
}
file_put_contents($filename,$out);
+ }
}
function removeLine($filename,$search_pattern,$strict = 0) {
- $lines = file($filename);
+ if($lines = @file($filename)) {
$out = '';
foreach($lines as $line) {
if($strict == 0) {
@@ -543,6 +552,7 @@
}
}
file_put_contents($filename,$out);
+ }
}
--
Gitblit v1.9.1