diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2010-05-18 18:08:09 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2010-05-18 18:08:09 -0400 |
commit | d16af75d98e56a53f7b42ba10fabae1267878841 (patch) | |
tree | cfea4a76eaa62910278ece3b55c2309d064d6cea /etc/inc | |
parent | 31c9379c46455d7cf1bb9977ab30f7196cba2d10 (diff) | |
download | pfsense-d16af75d98e56a53f7b42ba10fabae1267878841.zip pfsense-d16af75d98e56a53f7b42ba10fabae1267878841.tar.gz |
Nuke nonsense
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/system.inc | 35 |
1 files changed, 1 insertions, 34 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc index c8d200f..0cf1b84 100644 --- a/etc/inc/system.inc +++ b/etc/inc/system.inc @@ -1414,41 +1414,8 @@ function system_identify_specific_platform() { function system_get_dmesg_boot() { global $g; - - if (!file_exists("{$g['varlog_path']}/dmesg.boot")) - system_dmesg_save(); - + return file_get_contents("{$g['varlog_path']}/dmesg.boot"); } -function system_dmesg_save() { - global $g; - - if (file_exists("{$g['varlog_path']}/dmesg.boot")) - return 0; /* nothing to do */ - - exec("/sbin/dmesg", $dmesg); - - /* find last copyright line (output from previous boots may be present) */ - $lastcpline = 0; - - for ($i = 0; $i < count($dmesg); $i++) { - if (strstr($dmesg[$i], "Copyright (c) 1992-")) - $lastcpline = $i; - } - - $fd = fopen("{$g['varlog_path']}/dmesg.boot", "w"); - if (!$fd) { - printf("Error: cannot open dmesg.boot in system_dmesg_save().\n"); - return 1; - } - - for ($i = $lastcpline; $i < count($dmesg); $i++) - fwrite($fd, $dmesg[$i] . "\n"); - - fclose($fd); - - return 0; -} - ?>
\ No newline at end of file |