$v) { $query .= $k . '=' . $v . '&'; } //$query = substr($query, 0, -1); echo << $uuid]); if ($row !== false && !empty($row['systemmodel'])) { $model = $row['systemmodel']; } } if ($model === false) { // Otherwise use what iPXE sent us function modfilt($str) { if (empty($str) || preg_match('/product\s+name|be\s+filled|unknown|default\s+string/i', $str)) return false; return trim(preg_replace('/\s+/', ' ', $str)); } $manuf = modfilt($manuf); $product = modfilt($product); if (!empty($product)) { $model = $product; if (!empty($manuf)) { $model .= " ($manuf)"; } } } // Query if ($model !== false) { $row = Database::queryFirst("SELECT bootmethod FROM serversetup_localboot WHERE systemmodel = :model LIMIT 1", ['model' => $model]); if ($row !== false) { $localboot = $row['bootmethod']; } } if ($localboot === false || !isset($BOOT_METHODS[$localboot])) { $localboot = Property::get(Localboot::PROPERTY_KEY, 'AUTO'); if (!isset($BOOT_METHODS[$localboot])) { $localboot = 'AUTO'; } } if (isset($BOOT_METHODS[$localboot])) { // Move preferred method first $BOOT_METHODS[] = $BOOT_METHODS[$localboot]; unset($BOOT_METHODS[$localboot]); $BOOT_METHODS = array_reverse($BOOT_METHODS); } if ($slxExtensions) { $slxConsoleUpdate = '--update'; } else { $slxConsoleUpdate = ''; } $output = <<getMenuDefinition('target', $platform, $slxExtensions); $output .= <<getItemsCode($platform); /* :i5 chain -a /tftp/memtest.0 passes=1 onepass || goto membad prompt Memory OK. Press a key. goto init :i8 set x:int32 0 :again console --left 60 --top 130 --right 67 --bottom 96 --picture bg-load --keep || console --left 55 --top 88 --right 63 --bottom 64 --picture bg-menu --keep || inc x iseq \${x} 20 || goto again prompt DONE. Press dein Knie. goto slx_menu :membad iseq \${errno} 0x1 || goto memaborted params param scrot \${vram} imgfetch -a http://132.230.8.113/screen.php##params || prompt Memory is bad. Press a key. goto init :memaborted params param scrot \${vram} imgfetch -a http://132.230.8.113/screen.php##params || prompt Memory test aborted. Press a key. goto init */ $output .= <<