Add full path for dmesg and replace backtick by exec

This commit is contained in:
Renato Botelho 2014-06-19 15:57:42 -03:00
parent 902da38805
commit c69d32f65d

View File

@ -121,7 +121,7 @@ else if ($g['booting'] and !file_exists($g['cf_conf_path'] . "/config.xml") ) {
if (strstr($g['platform'], "cdrom")) {
/* config is on floppy disk for CD-ROM version */
$cfgdevice = $cfgpartition = "fd0";
$dmesg = `dmesg -a`;
$_gb = exec('/sbin/dmesg -a', $dmesg);
if(preg_match("/da0/", $dmesg) == true) {
$cfgdevice = $cfgpartition = "da0" ;
if (mwexec("/sbin/mount -r /dev/{$cfgdevice} /cf")) {