@@ -293,9 +293,11 @@ function get_distname() {
293293
294294 //** RHEL (including compatible clones) & Fedora
295295 elseif (file_exists ('/etc/redhat-release ' ) && file_exists ('/etc/os-release ' )) {
296- $ content = file_get_contents ('/etc/os-release ' );
297296
298- preg_match ('/(?<=NAME=\").+?(?=\")/ ' , $ content , $ name );
297+ $ content = file_get_contents ('/etc/os-release ' );
298+
299+ preg_match ('/(?<=PRETTY_NAME=\").+?(?=\")/ ' , $ content , $ prettyname );
300+ preg_match ('/(?<=NAME=\").+?(?=\")/ ' , $ content , $ name );
299301 preg_match ('/(?<=VERSION=\").+?(?=\")/ ' , $ content , $ version );
300302 preg_match ('/(?<=VERSION_ID=\").+?(?=\")/ ' , $ content , $ versionid );
301303
@@ -318,14 +320,14 @@ function get_distname() {
318320 $ distver = is_array ($ centos7_string )? implode ('. ' , array_filter (array ($ centos7_string [1 ][0 ],$ centos7_string [2 ][0 ],$ centos7_string [3 ][0 ]),'strlen ' )) : $ version [0 ];
319321 $ distid = 'centos72 ' ;
320322 $ distbaseid = 'fedora ' ;
321- swriteln ("Operating System: RHEL 7 or compatible \n" );
323+ swriteln ("Operating System: RHEL/CentOS 7 or compatible \n" );
322324 //** RHEL 8 and compatible clones
323325 } elseif (preg_match ('/^(?:8|8\.[0-9]{1,2})$/ ' , $ versionid [0 ])) {
324326 $ distname = $ name [0 ];
325327 $ distver = $ version [0 ];
326328 $ distid = 'centos80 ' ;
327329 $ distbaseid = 'fedora ' ;
328- swriteln ("Operating System: RHEL 8 or compatible \n" );
330+ swriteln ("Operating System: RHEL/CentOS 8 or compatible \n" );
329331 } else {
330332 $ distname = 'Redhat ' ;
331333 $ distver = 'Unknown ' ;
0 commit comments