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
7617f793
Commit
7617f793
authored
Jan 19, 2017
by
Till Brehm
Browse files
Use improved centos version recognition from
@dario.git.ispc
parent
25376579
Changes
2
Hide whitespace changes
Inline
Side-by-side
install/lib/install.lib.php
View file @
7617f793
...
...
@@ -297,40 +297,19 @@ function get_distname() {
$distid
=
'centos53'
;
$distbaseid
=
'fedora'
;
swriteln
(
"Operating System: CentOS 6 or compatible
\n
"
);
}
elseif
(
stristr
(
$content
,
'CentOS Linux release 7.2'
))
{
$distname
=
'CentOS'
;
$distver
=
'Unknown'
;
$distid
=
'centos72'
;
$distconfid
=
'centos72'
;
$distbaseid
=
'fedora'
;
swriteln
(
"Operating System: CentOS 7.2
\n
"
);
}
elseif
(
stristr
(
$content
,
'CentOS Linux release 7.3'
))
{
$distname
=
'CentOS'
;
$distver
=
'Unknown'
;
$distid
=
'centos72'
;
$distconfid
=
'centos72'
;
$distbaseid
=
'fedora'
;
swriteln
(
"Operating System: CentOS 7.3
\n
"
);
}
elseif
(
stristr
(
$content
,
'CentOS Linux release 7.4'
))
{
$distname
=
'CentOS'
;
$distver
=
'Unknown'
;
$distid
=
'centos72'
;
$distconfid
=
'centos72'
;
$distbaseid
=
'fedora'
;
swriteln
(
"Operating System: CentOS 7.4
\n
"
);
}
elseif
(
stristr
(
$content
,
'CentOS Linux release 7.5'
))
{
$distname
=
'CentOS'
;
$distver
=
'Unknown'
;
$distid
=
'centos72'
;
$distconfid
=
'centos72'
;
$distbaseid
=
'fedora'
;
swriteln
(
"Operating System: CentOS 7.5
\n
"
);
}
elseif
(
stristr
(
$content
,
'CentOS Linux release 7'
))
{
$distname
=
'CentOS'
;
$distver
=
'Unknown'
;
$distid
=
'centos70'
;
$distbaseid
=
'fedora'
;
swriteln
(
"Operating System: CentOS 7 or compatible
\n
"
);
$var
=
explode
(
" "
,
$content
);
$var
=
explode
(
"."
,
$var
[
3
]);
$var
=
$var
[
0
]
.
"."
.
$var
[
1
];
if
(
$var
==
'7.0'
||
$var
==
'7.1'
)
{
$distid
=
'centos70'
;
}
else
{
$distid
=
'centos72'
;
}
swriteln
(
"Operating System: CentOS
$var
\n
"
);
}
else
{
$distname
=
'Redhat'
;
$distver
=
'Unknown'
;
...
...
server/lib/classes/monitor_tools.inc.php
View file @
7617f793
...
...
@@ -273,38 +273,19 @@ class monitor_tools {
$distver
=
'Unknown'
;
$distid
=
'centos53'
;
$distbaseid
=
'fedora'
;
}
elseif
(
stristr
(
$content
,
'CentOS Linux release 7.2'
))
{
$distname
=
'CentOS'
;
$distver
=
'Unknown'
;
$distid
=
'centos70'
;
$distconfid
=
'centos72'
;
$distbaseid
=
'fedora'
;
}
elseif
(
stristr
(
$content
,
'CentOS Linux release 7.3'
))
{
$distname
=
'CentOS'
;
$distver
=
'Unknown'
;
$distid
=
'centos72'
;
$distconfid
=
'centos72'
;
$distbaseid
=
'fedora'
;
swriteln
(
"Operating System: CentOS 7.3
\n
"
);
}
elseif
(
stristr
(
$content
,
'CentOS Linux release 7.4'
))
{
$distname
=
'CentOS'
;
$distver
=
'Unknown'
;
$distid
=
'centos72'
;
$distconfid
=
'centos72'
;
$distbaseid
=
'fedora'
;
swriteln
(
"Operating System: CentOS 7.4
\n
"
);
}
elseif
(
stristr
(
$content
,
'CentOS Linux release 7.5'
))
{
$distname
=
'CentOS'
;
$distver
=
'Unknown'
;
$distid
=
'centos72'
;
$distconfid
=
'centos72'
;
$distbaseid
=
'fedora'
;
swriteln
(
"Operating System: CentOS 7.5
\n
"
);
}
elseif
(
stristr
(
$content
,
'CentOS Linux release 7'
))
{
$distname
=
'CentOS'
;
$distver
=
'Unknown'
;
$distid
=
'centos70'
;
$distbaseid
=
'fedora'
;
$var
=
explode
(
" "
,
$content
);
$var
=
explode
(
"."
,
$var
[
3
]);
$var
=
$var
[
0
]
.
"."
.
$var
[
1
];
if
(
$var
==
'7.0'
||
$var
==
'7.1'
)
{
$distid
=
'centos70'
;
}
else
{
$distid
=
'centos72'
;
}
swriteln
(
"Operating System: CentOS
$var
\n
"
);
}
else
{
$distname
=
'Redhat'
;
$distver
=
'Unknown'
;
...
...
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