Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISPConfig
ISPConfig 3
Commits
34439310
Commit
34439310
authored
Sep 03, 2008
by
tbrehm
Browse files
- reorganized the installer - part 1
parent
6444a957
Changes
4
Show whitespace changes
Inline
Side-by-side
install/dist/lib/fedora
9
.lib.php
→
install/dist/lib/fedora.lib.php
View file @
34439310
...
...
@@ -28,7 +28,7 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
class
installer
extends
installer_base
{
class
installer
_dist
extends
installer_base
{
function
configure_postfix
(
$options
=
''
)
{
...
...
install/dist/lib/opensuse
110
.lib.php
→
install/dist/lib/opensuse.lib.php
View file @
34439310
File moved
install/install.php
View file @
34439310
...
...
@@ -57,13 +57,14 @@ require_once('lib/install.lib.php');
require_once
(
'lib/installer_base.lib.php'
);
//** Get distribution identifier
$dist
name
=
get_distname
();
$dist
=
get_distname
();
if
(
$dist
name
==
''
)
die
(
'Linux Dustribution or Version not recognized.'
);
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/'
.
strtolower
(
$dist
[
'name'
])
.
'.lib.php'
))
include_once
(
'dist/lib/'
.
strtolower
(
$dist
[
'name'
])
.
'.lib.php'
);
include_once
(
'dist/lib/'
.
$dist
[
'id'
]
.
'.lib.php'
);
include_once
(
'dist/conf/'
.
$dist
[
'id'
]
.
'.conf.php'
);
//** Install logfile
define
(
'ISPC_LOG_FILE'
,
'/var/log/ispconfig_install.log'
);
...
...
install/lib/install.lib.php
View file @
34439310
...
...
@@ -65,11 +65,15 @@ function get_distname() {
if
(
file_exists
(
'/etc/debian_version'
))
{
if
(
trim
(
file_get_contents
(
'/etc/debian_version'
))
==
'4.0'
)
{
$distname
=
'debian40'
;
$distname
=
'Debian'
;
$distver
=
'4.0'
;
$distid
=
'debian40'
;
swriteln
(
"Operating System: Debian 4.0 or compatible
\n
"
);
}
if
(
trim
(
file_get_contents
(
'/etc/debian_version'
))
==
'lenny/sid'
)
{
$distname
=
'debian40'
;
$distname
=
'Debian'
;
$distver
=
'Lenny/Sid'
;
$distid
=
'debian40'
;
swriteln
(
"Operating System: Debian Lenny/Sid or compatible
\n
"
);
}
}
...
...
@@ -77,7 +81,9 @@ function get_distname() {
//** OpenSuSE
elseif
(
file_exists
(
"/etc/SuSE-release"
))
{
if
(
stristr
(
file_get_contents
(
'/etc/SuSE-release'
),
'11.0'
))
{
$distname
=
'opensuse110'
;
$distname
=
'openSUSE'
;
$distver
=
'11.0'
;
$distid
=
'opensuse110'
;
swriteln
(
"Operating System: openSUSE 11.0 or compatible
\n
"
);
}
}
...
...
@@ -89,7 +95,9 @@ function get_distname() {
$content
=
file_get_contents
(
'/etc/redhat-release'
);
if
(
stristr
(
$content
,
'Fedora release 9 (Sulphur)'
))
{
$distname
=
'fedora9'
;
$distname
=
'Fedora'
;
$distver
=
'9'
;
$distid
=
'fedora9'
;
swriteln
(
"Operating System: Fedora 9 or compatible
\n
"
);
}
...
...
@@ -98,7 +106,7 @@ function get_distname() {
die
(
'unrecognized linux distribution'
);
}
return
$distname
;
return
array
(
'name'
=>
$distname
,
'version'
=>
$distver
,
'id'
=>
$distid
)
;
}
function
sread
()
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment