fix for Univention removing quotes in /etc/lsb-release http://errata.univention.de/ucs/4.0/286.html

This commit is contained in:
Ralf Becker 2015-09-01 11:10:17 +00:00
parent 38d7f53a16
commit a9f7fbc31d

View File

@ -92,7 +92,7 @@ function set_distro_defaults($distro=null)
{ {
$distro = file_exists('/etc/SuSE-release') ? 'suse' : $distro = file_exists('/etc/SuSE-release') ? 'suse' :
(file_exists('/etc/mandriva-release') ? 'mandriva' : (file_exists('/etc/mandriva-release') ? 'mandriva' :
(file_exists('/etc/lsb-release') && preg_match('/^DISTRIB_ID="Univention"$/mi', (file_exists('/etc/lsb-release') && preg_match('/^DISTRIB_ID="?Univention"?$/mi',
file_get_contents('/etc/lsb-release')) ? 'univention' : file_get_contents('/etc/lsb-release')) ? 'univention' :
(file_exists('/etc/debian_version') ? 'debian' : 'rh'))); (file_exists('/etc/debian_version') ? 'debian' : 'rh')));
} }