also perform checks in Install class
This commit is contained in:
@@ -1340,9 +1340,18 @@ class FroxlorInstall
|
|||||||
// post
|
// post
|
||||||
if (! empty($_POST['distribution'])) {
|
if (! empty($_POST['distribution'])) {
|
||||||
$this->_data['distribution'] = $_POST['distribution'];
|
$this->_data['distribution'] = $_POST['distribution'];
|
||||||
} else {
|
} else {
|
||||||
$os_dist = parse_ini_file('/etc/os-release', false);
|
//set default os.
|
||||||
$os_version = explode('.',$os_dist['VERSION_ID'])[0];
|
$os_dist = array('ID' => 'buster');
|
||||||
|
$os_version = array('0' => '10');
|
||||||
|
|
||||||
|
//read os-release
|
||||||
|
if(file_exists('/etc/os-release')) {
|
||||||
|
$os_dist = parse_ini_file('/etc/os-release', false);
|
||||||
|
if(is_array($os_dist) && array_key_exists('ID', $os_dist) && array_key_exists('VERSION_ID', $os_dist)) {
|
||||||
|
$os_version = explode('.',$os_dist['VERSION_ID'])[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$distros = glob(\Froxlor\FileDir::makeCorrectDir(\Froxlor\Froxlor::getInstallDir() . '/lib/configfiles/') . '*.xml');
|
$distros = glob(\Froxlor\FileDir::makeCorrectDir(\Froxlor\Froxlor::getInstallDir() . '/lib/configfiles/') . '*.xml');
|
||||||
foreach ($distros as $_distribution) {
|
foreach ($distros as $_distribution) {
|
||||||
|
|||||||
Reference in New Issue
Block a user