|
30 | 30 |
|
31 | 31 | /* |
32 | 32 | This function returns a string that describes the installed |
33 | | - linux distribution. e.g. debian40 for Debian Linux 4.0 |
| 33 | + Linux distribution. e.g. debian40 for Debian GNU/Linux 4.0 |
34 | 34 | */ |
35 | 35 |
|
36 | 36 |
|
@@ -183,7 +183,7 @@ function get_distname() { |
183 | 183 | swriteln("Operating System: Gentoo $distver or compatible\n"); |
184 | 184 |
|
185 | 185 | } else { |
186 | | - die('unrecognized linux distribution'); |
| 186 | + die('unrecognized Linux distribution'); |
187 | 187 | } |
188 | 188 |
|
189 | 189 | return array('name' => $distname, 'version' => $distver, 'id' => $distid, 'baseid' => $distbaseid); |
@@ -355,61 +355,6 @@ function no_comments($file, $comment = '#'){ |
355 | 355 | } |
356 | 356 | } |
357 | 357 |
|
358 | | -function find_includes($file){ |
359 | | - global $httpd_root; |
360 | | - clearstatcache(); |
361 | | - if(is_file($file) && filesize($file) > 0){ |
362 | | - $includes[] = $file; |
363 | | - $inhalt = unix_nl(no_comments($file)); |
364 | | - $lines = explode("\n", $inhalt); |
365 | | - if(!empty($lines)){ |
366 | | - foreach($lines as $line){ |
367 | | - if(stristr($line, 'include ')){ |
368 | | - $include_file = str_replace("\n", '', trim(shell_exec("echo \"$line\" | awk '{print \$2}'"))); |
369 | | - if(substr($include_file,0,1) != '/'){ |
370 | | - $include_file = $httpd_root.'/'.$include_file; |
371 | | - } |
372 | | - if(is_file($include_file)){ |
373 | | - if($further_includes = find_includes($include_file)){ |
374 | | - $includes = array_merge($includes, $further_includes); |
375 | | - } |
376 | | - } else { |
377 | | - if(strstr($include_file, '*')){ |
378 | | - $more_files = explode("\n", shell_exec("ls -l $include_file | awk '{print \$9}'")); |
379 | | - if(!empty($more_files)){ |
380 | | - foreach($more_files as $more_file){ |
381 | | - if(is_file($more_file)){ |
382 | | - if($further_includes = find_includes($more_file)){ |
383 | | - $includes = array_merge($includes, $further_includes); |
384 | | - } |
385 | | - } |
386 | | - } |
387 | | - } |
388 | | - unset($more_files); |
389 | | - $more_files = explode("\n", shell_exec("ls -l $include_file | awk '{print \$10}'")); |
390 | | - if(!empty($more_files)){ |
391 | | - foreach($more_files as $more_file){ |
392 | | - if(is_file($more_file)){ |
393 | | - if($further_includes = find_includes($more_file)){ |
394 | | - $includes = array_merge($includes, $further_includes); |
395 | | - } |
396 | | - } |
397 | | - } |
398 | | - } |
399 | | - } |
400 | | - } |
401 | | - } |
402 | | - } |
403 | | - } |
404 | | - } |
405 | | - if(is_array($includes)){ |
406 | | - $includes = array_unique($includes); |
407 | | - return $includes; |
408 | | - } else { |
409 | | - return false; |
410 | | - } |
411 | | -} |
412 | | - |
413 | 358 | function comment_out($file, $string){ |
414 | 359 | $inhalt = no_comments($file); |
415 | 360 | $gesamt_inhalt = rf($file); |
|
0 commit comments