Commit 90511b77 authored by tbrehm's avatar tbrehm

- reorganized the installer - part 3

parent 5447d9c2
......@@ -62,7 +62,7 @@ $dist = get_distname();
if($dist['id'] == '') die('Linux Dustribution or Version not recognized.');
//** Include the distribution specific installer class library and configuration
if(is_file('dist/lib/'.strtolower($dist['name']).'.lib.php')) include_once('dist/lib/'.strtolower($dist['name']).'.lib.php');
if(is_file('dist/lib/'.$dist['baseid'].'.lib.php')) include_once('dist/lib/'.$dist['baseid'].'.lib.php');
include_once('dist/lib/'.$dist['id'].'.lib.php');
include_once('dist/conf/'.$dist['id'].'.conf.php');
......
......@@ -68,12 +68,14 @@ function get_distname() {
$distname = 'Debian';
$distver = '4.0';
$distid = 'debian40';
$distbaseid = 'debian';
swriteln("Operating System: Debian 4.0 or compatible\n");
}
if(trim(file_get_contents('/etc/debian_version')) == 'lenny/sid') {
$distname = 'Debian';
$distver = 'Lenny/Sid';
$distid = 'debian40';
$distbaseid = 'debian';
swriteln("Operating System: Debian Lenny/Sid or compatible\n");
}
}
......@@ -84,6 +86,7 @@ function get_distname() {
$distname = 'openSUSE';
$distver = '11.0';
$distid = 'opensuse110';
$distbaseid = 'opensuse';
swriteln("Operating System: openSUSE 11.0 or compatible\n");
}
}
......@@ -98,6 +101,7 @@ function get_distname() {
$distname = 'Fedora';
$distver = '9';
$distid = 'fedora9';
$distbaseid = 'fedora';
swriteln("Operating System: Fedora 9 or compatible\n");
}
......@@ -106,7 +110,7 @@ function get_distname() {
die('unrecognized linux distribution');
}
return array('name' => $distname, 'version' => $distver, 'id' => $distid);
return array('name' => $distname, 'version' => $distver, 'id' => $distid, 'baseid' => $distbaseid);
}
function sread() {
......
......@@ -59,15 +59,18 @@ if(is_dir('/root/ispconfig') || is_dir('/home/admispconfig')) {
}
//** Get distribution identifier
$distname = get_distname();
$dist = get_distname();
include_once("/usr/local/ispconfig/server/lib/config.inc.php");
$conf_old = $conf;
unset($conf);
if($dist['id'] == '') die('Linux Dustribution or Version not recognized.');
//** Include the distribution specific installer class library and configuration
include_once('dist/lib/'.$distname.'.lib.php');
include_once('dist/conf/'.$distname.'.conf.php');
if(is_file('dist/lib/'.$dist['baseid'].'.lib.php')) include_once('dist/lib/'.$dist['baseid'].'.lib.php');
include_once('dist/lib/'.$dist['id'].'.lib.php');
include_once('dist/conf/'.$dist['id'].'.conf.php');
//** Get hostname
exec('hostname -f', $tmp_out);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment