- reorganized the installer - part 3
| | |
| | | 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'); |
| | | |
| | |
| | | $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"); |
| | | } |
| | | } |
| | |
| | | $distname = 'openSUSE'; |
| | | $distver = '11.0'; |
| | | $distid = 'opensuse110'; |
| | | $distbaseid = 'opensuse'; |
| | | swriteln("Operating System: openSUSE 11.0 or compatible\n"); |
| | | } |
| | | } |
| | |
| | | $distname = 'Fedora'; |
| | | $distver = '9'; |
| | | $distid = 'fedora9'; |
| | | $distbaseid = 'fedora'; |
| | | swriteln("Operating System: Fedora 9 or compatible\n"); |
| | | } |
| | | |
| | |
| | | die('unrecognized linux distribution'); |
| | | } |
| | | |
| | | return array('name' => $distname, 'version' => $distver, 'id' => $distid); |
| | | return array('name' => $distname, 'version' => $distver, 'id' => $distid, 'baseid' => $distbaseid); |
| | | } |
| | | |
| | | function sread() { |
| | |
| | | } |
| | | |
| | | //** 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); |