diff options
Diffstat (limited to 'etc/inc/util.inc')
-rw-r--r-- | etc/inc/util.inc | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc index 169f784..b2c797b 100644 --- a/etc/inc/util.inc +++ b/etc/inc/util.inc @@ -1836,13 +1836,11 @@ function get_memory() { } function mute_kernel_msgs() { - global $config; + global $g, $config; // Do not mute serial console. The kernel gets very very cranky // and will start dishing you cannot control tty errors. - switch (trim(file_get_contents("/etc/platform"))) { - case "nanobsd": - case "jail": - return; + if ($g['platform'] == 'nanobsd') { + return; } if ($config['system']['enableserial']) { return; @@ -1851,23 +1849,16 @@ function mute_kernel_msgs() { } function unmute_kernel_msgs() { - global $config; + global $g; // Do not mute serial console. The kernel gets very very cranky // and will start dishing you cannot control tty errors. - switch (trim(file_get_contents("/etc/platform"))) { - case "nanobsd": - case "jail": - return; + if ($g['platform'] == 'nanobsd') { + return; } exec("/sbin/conscontrol mute off"); } function start_devd() { - global $g; - - if ($g['platform'] == 'jail') { - return; - } /* Use the undocumented -q options of devd to quiet its log spamming */ $_gb = exec("/sbin/devd -q"); sleep(1); |